diff options
author | Brad King <brad.king@kitware.com> | 2017-02-03 15:08:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-06 14:53:15 (GMT) |
commit | f8f3cb8d65d3ddbd8840814df7df884a2714b88e (patch) | |
tree | 6a155f4c64a1e83030356f7626e6f23f1c39a827 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 6286d26ca6408cfc45031536ed54b1679e6d5ac2 (diff) | |
download | CMake-f8f3cb8d65d3ddbd8840814df7df884a2714b88e.zip CMake-f8f3cb8d65d3ddbd8840814df7df884a2714b88e.tar.gz CMake-f8f3cb8d65d3ddbd8840814df7df884a2714b88e.tar.bz2 |
VS: Fix quoting of special characters in cmake re-run check commands
Fix our calls to `AddCustomCommandToOutput` for adding cmake re-run
check commands to disable old-style quoting in favor of the full quoting
logic. This is necessary when paths contain special characters like `&`
that old-style quoting logic does not handle.
This also requires us to expand the `$(SolutionPath)` placeholder
explicitly because otherwise its expanded value will no longer be quoted
correctly. As a side effect, this fixes the value in VS 10 and above
where the placeholder may be undefined when driving the build through
MSBuild without the `.sln` file.
Reported-by: Steven Cook <sc@harshbutfair.org>
Fixes: #16585
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 49b057b..38dda04 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -260,9 +260,7 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() args += this->GetBinaryDirectory(); commandLine.push_back(args); commandLine.push_back("--check-stamp-file"); - std::string stampFilename = this->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(stampName), cmOutputConverter::SHELL); - commandLine.push_back(stampFilename.c_str()); + commandLine.push_back(stampName); std::vector<std::string> const& listFiles = this->Makefile->GetListFiles(); @@ -273,7 +271,7 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() cmSystemTools::CollapseFullPath(stampName.c_str()); this->Makefile->AddCustomCommandToOutput( fullpathStampName.c_str(), listFiles, makefileIn.c_str(), commandLines, - comment.c_str(), no_working_directory, true); + comment.c_str(), no_working_directory, true, false); if (cmSourceFile* file = this->Makefile->GetSource(makefileIn.c_str())) { return file; } else { |