[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5295-g90491b3

Brad King brad.king at kitware.com
Mon Nov 18 11:24:46 EST 2013


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  90491b3ed238fd07f9876818a0e69e07968dde57 (commit)
       via  2188d96e463ba0600139302c72cef7c0b7b4ca69 (commit)
      from  3baea9fc060d3f9d1acd089f0e87ab872c6589bb (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90491b3ed238fd07f9876818a0e69e07968dde57
commit 90491b3ed238fd07f9876818a0e69e07968dde57
Merge: 3baea9f 2188d96
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 18 11:24:34 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 18 11:24:34 2013 -0500

    Merge topic 'cleanup-build-commands' into next
    
    2188d96 VS: Fix VS >= 10 build tool selection from CMAKE_MAKE_PROGRAM


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2188d96e463ba0600139302c72cef7c0b7b4ca69
commit 2188d96e463ba0600139302c72cef7c0b7b4ca69
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 18 11:15:33 2013 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 18 11:15:33 2013 -0500

    VS: Fix VS >= 10 build tool selection from CMAKE_MAKE_PROGRAM
    
    When a build tree contains an explicit CMAKE_MAKE_PROGRAM cache entry, the
    cmGlobalVisualStudio10Generator::GenerateBuildCommand method must
    recognize when it is devenv and defer to cmGlobalVisualStudio7Generator.
    Similarly, cmGlobalVisualStudio7Generator::GenerateBuildCommand must
    ignore any suggestion to use msbuild and force use of devenv.

diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index c51d807..29401c6 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -310,8 +310,12 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
   bool fast,
   std::vector<std::string> const& makeOptions)
 {
+  // Select the caller- or user-preferred make program, else MSBuild.
+  std::string makeProgramSelected =
+    this->SelectMakeProgram(makeProgram, this->GetMSBuildCommand());
+
   // Check if the caller explicitly requested a devenv tool.
-  std::string makeProgramLower = makeProgram? makeProgram : "";
+  std::string makeProgramLower = makeProgramSelected;
   cmSystemTools::LowerCase(makeProgramLower);
   bool useDevEnv =
     (makeProgramLower.find("devenv") != std::string::npos ||
@@ -342,9 +346,6 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
          proj.substr(proj.size()-7) == ".vfproj")
         {
         useDevEnv = true;
-        // The caller-provided makeProgram did not suggest devenv,
-        // but now we need devenv, so ignore the caller suggestion.
-        makeProgram = 0;
         }
       }
     }
@@ -358,9 +359,7 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
     return;
     }
 
-  makeCommand.push_back(
-    this->SelectMakeProgram(makeProgram, this->GetMSBuildCommand())
-    );
+  makeCommand.push_back(makeProgramSelected);
 
   // msbuild.exe CxxOnly.sln /t:Build /p:Configuration=Debug /target:ALL_BUILD
   if(!targetName || strlen(targetName) == 0)
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 9cd88ef..3d939f3 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -147,9 +147,21 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
   bool /*fast*/,
   std::vector<std::string> const& makeOptions)
 {
-  makeCommand.push_back(
-    this->SelectMakeProgram(makeProgram, this->GetDevEnvCommand())
-    );
+  // Select the caller- or user-preferred make program, else devenv.
+  std::string makeProgramSelected =
+    this->SelectMakeProgram(makeProgram, this->GetDevEnvCommand());
+
+  // Ignore the above preference if it is msbuild.
+  // Assume any other value is either a devenv or
+  // command-line compatible with devenv.
+  std::string makeProgramLower = makeProgramSelected;
+  cmSystemTools::LowerCase(makeProgramLower);
+  if(makeProgramLower.find("msbuild") != std::string::npos)
+    {
+    makeProgramSelected = this->GetDevEnvCommand();
+    }
+
+  makeCommand.push_back(makeProgramSelected);
 
   makeCommand.push_back(std::string(projectName) + ".sln");
   bool clean = false;

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

Summary of changes:
 Source/cmGlobalVisualStudio10Generator.cxx |   13 ++++++-------
 Source/cmGlobalVisualStudio7Generator.cxx  |   18 +++++++++++++++---
 2 files changed, 21 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list