From aaae1b2a30b656e5a47b0dae96603d3ad8ec5d12 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 15 Apr 2021 17:51:34 +0300 Subject: Xcode: handle capturing generators. --- mesonbuild/backend/xcodebackend.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index 4271748..e7f6846 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -981,7 +981,13 @@ class XCodeBackend(backends.Backend): o = os.path.join(self.get_target_private_dir(t), o_base) args = [x.replace("@INPUT@", infilename).replace('@OUTPUT@', o).replace('@BUILD_DIR@', self.get_target_private_dir(t)) for x in base_args] args = self.replace_outputs(args, self.get_target_private_dir(t), outfilelist) - commands.append(exe_arr + args) + args = self.replace_extra_args(args, genlist) + if generator.capture: + # When capturing, stdout is the output. Forward it with the shell. + full_command = ['('] + exe_arr + args + ['>', o, ')'] + else: + full_command = exe_arr + args + commands.append(full_command) gen_dict.add_item('runOnlyForDeploymentPostprocessing', 0) gen_dict.add_item('shellPath', '/bin/sh') quoted_cmds = [] -- cgit v1.1