aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cmake.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r--mesonbuild/modules/cmake.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index a36d748..3a01636 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -274,7 +274,10 @@ class CmakeModule(ExtensionModule):
if len(args) != 1:
raise InterpreterException('Subproject takes exactly one argument')
dirname = args[0]
- return CMakeSubprojectHolder(interpreter.do_subproject(dirname, 'cmake', kwargs), dirname)
+ subp = interpreter.do_subproject(dirname, 'cmake', kwargs)
+ if not subp.held_object:
+ return subp
+ return CMakeSubprojectHolder(subp, dirname)
def initialize(*args, **kwargs):
return CmakeModule(*args, **kwargs)