aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2018-08-18 08:09:03 -0300
committerThibault Saunier <tsaunier@igalia.com>2018-08-18 09:04:08 -0300
commit221ac05c6924ebd03f11632fd6abd4f5f9acc493 (patch)
tree3ba367e2bf7be40b31525b163cce18784c78fba1
parenta95763c715111053538434c0f1df87d5efcf4aad (diff)
downloadmeson-221ac05c6924ebd03f11632fd6abd4f5f9acc493.zip
meson-221ac05c6924ebd03f11632fd6abd4f5f9acc493.tar.gz
meson-221ac05c6924ebd03f11632fd6abd4f5f9acc493.tar.bz2
interpreter: Also process *TargetHolder returned by modules
The module might need to add extra methods on the returned targets and thus it can return TargetHolders, we should process the held targets
-rw-r--r--mesonbuild/interpreter.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index e6dbb5c..9c161cb 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2000,6 +2000,9 @@ class Interpreter(InterpreterBase):
def process_new_values(self, invalues):
invalues = listify(invalues)
for v in invalues:
+ if isinstance(v, (RunTargetHolder, CustomTargetHolder, BuildTargetHolder)):
+ v = v.held_object
+
if isinstance(v, (build.BuildTarget, build.CustomTarget, build.RunTarget)):
self.add_target(v.name, v)
elif isinstance(v, list):