diff options
author | Nicolas Schneider <nioncode+git@gmail.com> | 2017-03-20 10:17:20 +0100 |
---|---|---|
committer | Nicolas Schneider <nioncode+git@gmail.com> | 2017-03-20 14:33:44 +0100 |
commit | b3073aa1ca0a6487261645ab44bee79229cf7265 (patch) | |
tree | 888161cc229566b4a6e524cc2e53e7b86c701934 | |
parent | b434fcd12b59f10f7623d27eafa8ac48c7d051f3 (diff) | |
download | meson-b3073aa1ca0a6487261645ab44bee79229cf7265.zip meson-b3073aa1ca0a6487261645ab44bee79229cf7265.tar.gz meson-b3073aa1ca0a6487261645ab44bee79229cf7265.tar.bz2 |
vs: use regular quotes instead of '"' in Generator commands
Seems like CustomBuild does not like '"', but works just fine with
regular quotes.
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 48958cd..e34712a 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -129,10 +129,9 @@ class Vs2010Backend(backends.Backend): args = self.replace_outputs(args, target_private_dir, outfiles_rel) args = [x.replace("@SOURCE_DIR@", self.environment.get_source_dir()).replace("@BUILD_DIR@", target_private_dir) for x in args] - fullcmd = exe_arr + self.replace_extra_args(args, genlist) - command = ' '.join(self.special_quote(fullcmd)) + cmd = exe_arr + self.replace_extra_args(args, genlist) cbs = ET.SubElement(idgroup, 'CustomBuild', Include=infilename) - ET.SubElement(cbs, 'Command').text = command + ET.SubElement(cbs, 'Command').text = ' '.join(self.quote_arguments(cmd)) ET.SubElement(cbs, 'Outputs').text = ';'.join(outfiles) return generator_output_files, custom_target_output_files, custom_target_include_dirs @@ -331,8 +330,8 @@ class Vs2010Backend(backends.Backend): directories = os.path.normpath(target.subdir).split(os.sep) return os.sep.join(['..'] * len(directories)) - def special_quote(self, arr): - return ['"%s"' % i for i in arr] + def quote_arguments(self, arr): + return ['"%s"' % i for i in arr] def create_basic_crap(self, target): project_name = target.name @@ -404,8 +403,7 @@ class Vs2010Backend(backends.Backend): # from the target dir, not the build root. target.absolute_paths = True (srcs, ofilenames, cmd) = self.eval_custom_target_command(target, True) - cmd_templ = '''"%s" ''' * len(cmd) - ET.SubElement(customstep, 'Command').text = cmd_templ % tuple(cmd) + ET.SubElement(customstep, 'Command').text = ' '.join(self.quote_arguments(cmd)) ET.SubElement(customstep, 'Outputs').text = ';'.join(ofilenames) ET.SubElement(customstep, 'Inputs').text = ';'.join(srcs) ET.SubElement(root, 'Import', Project='$(VCTargetsPath)\Microsoft.Cpp.targets') |