[Cmake-commits] CMake branch, next, updated. v3.7.2-2553-g73f49b0

Brad King brad.king at kitware.com
Mon Feb 6 09:55:21 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  73f49b01b85506fd3bf5a496a9dc5a48fc93fb6f (commit)
       via  f8f3cb8d65d3ddbd8840814df7df884a2714b88e (commit)
      from  9c24b1fa2b36569b6f53b9b12a1cc9ffca8146ee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73f49b01b85506fd3bf5a496a9dc5a48fc93fb6f
commit 73f49b01b85506fd3bf5a496a9dc5a48fc93fb6f
Merge: 9c24b1f f8f3cb8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 6 09:55:20 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 6 09:55:20 2017 -0500

    Merge topic 'vs-quote-rerun-paths' into next
    
    f8f3cb8d VS: Fix quoting of special characters in cmake re-run check commands


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8f3cb8d65d3ddbd8840814df7df884a2714b88e
commit f8f3cb8d65d3ddbd8840814df7df884a2714b88e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 3 10:08:37 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 6 09:53:15 2017 -0500

    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 at harshbutfair.org>
    Fixes: #16585

diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index e961a3d..8353a3f 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -298,7 +298,9 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
     commandLine.push_back("--check-stamp-list");
     commandLine.push_back(stampList.c_str());
     commandLine.push_back("--vs-solution-file");
-    commandLine.push_back("\"$(SolutionPath)\"");
+    std::string const sln = std::string(lg->GetBinaryDirectory()) + "/" +
+      lg->GetProjectName() + ".sln";
+    commandLine.push_back(sln);
     cmCustomCommandLines commandLines;
     commandLines.push_back(commandLine);
 
@@ -310,7 +312,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
     std::vector<std::string> no_byproducts;
     if (cmSourceFile* file = mf->AddCustomCommandToOutput(
           stamps, no_byproducts, listFiles, no_main_dependency, commandLines,
-          "Checking Build System", no_working_directory, true)) {
+          "Checking Build System", no_working_directory, true, false)) {
       gt->AddSource(file->GetFullPath());
     } else {
       cmSystemTools::Error("Error adding rule for ", stamps[0].c_str());
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 {

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list