summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-03 15:08:37 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-06 14:53:15 (GMT)
commitf8f3cb8d65d3ddbd8840814df7df884a2714b88e (patch)
tree6a155f4c64a1e83030356f7626e6f23f1c39a827 /Source/cmLocalVisualStudio7Generator.cxx
parent6286d26ca6408cfc45031536ed54b1679e6d5ac2 (diff)
downloadCMake-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.cxx6
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 {