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
pull/4016/head
Thibault Saunier 6 years ago
parent a95763c715
commit 221ac05c69
  1. 3
      mesonbuild/interpreter.py

@ -2000,6 +2000,9 @@ class Interpreter(InterpreterBase):
def process_new_values(self, invalues): def process_new_values(self, invalues):
invalues = listify(invalues) invalues = listify(invalues)
for v in invalues: for v in invalues:
if isinstance(v, (RunTargetHolder, CustomTargetHolder, BuildTargetHolder)):
v = v.held_object
if isinstance(v, (build.BuildTarget, build.CustomTarget, build.RunTarget)): if isinstance(v, (build.BuildTarget, build.CustomTarget, build.RunTarget)):
self.add_target(v.name, v) self.add_target(v.name, v)
elif isinstance(v, list): elif isinstance(v, list):

Loading…
Cancel
Save