aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/build.py4
-rw-r--r--test cases/common/49 custom target/meson.build6
2 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index d72aab8..8e0d81b 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2186,6 +2186,10 @@ class CommandBase:
elif isinstance(c, (BuildTarget, CustomTarget)):
self.dependencies.append(c)
final_cmd.append(c)
+ elif isinstance(c, CustomTargetIndex):
+ FeatureNew.single_use('CustomTargetIndex for command argument', '0.60', self.subproject)
+ self.dependencies.append(c.target)
+ final_cmd += self.flatten_command(File.from_built_file(c.get_subdir(), c.get_filename()))
elif isinstance(c, list):
final_cmd += self.flatten_command(c)
else:
diff --git a/test cases/common/49 custom target/meson.build b/test cases/common/49 custom target/meson.build
index 52e8630..8e3c9c6 100644
--- a/test cases/common/49 custom target/meson.build
+++ b/test cases/common/49 custom target/meson.build
@@ -46,6 +46,12 @@ endif
assert(mytarget_disabled, 'Disabled custom target should not be found.')
+mytarget_ci = custom_target('bindat_ci',
+output : 'data_ci.dat',
+input : 'data_source.txt',
+command : [python, comp, '--input=@INPUT@', '--output=@OUTPUT@', mytarget.to_list()],
+)
+
mytarget_disabler = custom_target('bindat',
output : 'data.dat',
input : disabler(),