aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r--mesonbuild/backend/vs2010backend.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 82fc0cf..716dc27 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -144,14 +144,13 @@ class Vs2010Backend(backends.Backend):
args = [x.replace('\\', '/') for x in args]
cmd = exe_arr + self.replace_extra_args(args, genlist)
if generator.capture:
- exe_data = self.serialize_executable(
+ cmd = self.as_meson_exe_cmdline(
'generator ' + cmd[0],
cmd[0],
cmd[1:],
self.environment.get_build_dir(),
capture=outfiles[0]
)
- cmd = self.environment.get_build_command() + ['--internal', 'exe', exe_data]
abs_pdir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target))
os.makedirs(abs_pdir, exist_ok=True)
cbs = ET.SubElement(idgroup, 'CustomBuild', Include=infilename)
@@ -559,18 +558,17 @@ class Vs2010Backend(backends.Backend):
tdir_abs = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target))
extra_bdeps = target.get_transitive_build_target_deps()
extra_paths = self.determine_windows_extra_paths(target.command[0], extra_bdeps)
- exe_data = self.serialize_executable(target.name, target.command[0], cmd[1:],
- # All targets run from the target dir
- tdir_abs,
- extra_paths=extra_paths,
- capture=ofilenames[0] if target.capture else None)
- wrapper_cmd = self.environment.get_build_command() + ['--internal', 'exe', exe_data]
+ wrapper_cmd = self.as_meson_exe_cmdline(target.name, target.command[0], cmd[1:],
+ # All targets run from the target dir
+ tdir_abs,
+ extra_paths=extra_paths,
+ capture=ofilenames[0] if target.capture else None)
if target.build_always_stale:
# Use a nonexistent file to always consider the target out-of-date.
ofilenames += [self.nonexistent_file(os.path.join(self.environment.get_scratch_dir(),
'outofdate.file'))]
self.add_custom_build(root, 'custom_target', ' '.join(self.quote_arguments(wrapper_cmd)),
- deps=[exe_data] + srcs + depend_files, outputs=ofilenames)
+ deps=wrapper_cmd[-1:] + srcs + depend_files, outputs=ofilenames)
ET.SubElement(root, 'Import', Project=r'$(VCTargetsPath)\Microsoft.Cpp.targets')
self.generate_custom_generator_commands(target, root)
self.add_regen_dependency(root)