[Cmake-commits] CMake branch, next, updated. v3.2.2-3033-ga17f3b2

Brad King brad.king at kitware.com
Wed May 20 11:43:32 EDT 2015


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  a17f3b295d1ce7f8135cbb4ed823a1a92aacff41 (commit)
       via  e54d2fdf50d7e1170f9e3dcbcb62ebacc7205de6 (commit)
       via  20c2fe4d10ac72b8352bdbea361124296a515d6c (commit)
       via  7601a7b12d1c4a3bddb1ca34dcf38e1aea188698 (commit)
       via  4080ca497e9841c73324e8cd4d1017a87065e879 (commit)
       via  ad70681909c75d266e297725eadd9f47e9bf001f (commit)
       via  6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6 (commit)
      from  0dfb62aa31d17de06f118322572f3a53df6b4f30 (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=a17f3b295d1ce7f8135cbb4ed823a1a92aacff41
commit a17f3b295d1ce7f8135cbb4ed823a1a92aacff41
Merge: 0dfb62a e54d2fd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 20 11:43:30 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 20 11:43:30 2015 -0400

    Merge topic 'clean-up-cmLocalGenerator' into next
    
    e54d2fdf Convert: Remove specification of default parameter.
    20c2fe4d cmLocalGenerator: Get enabled languages from cmState.
    7601a7b1 cmLocalGenerator: Implement IsRootMakefile in terms of cmState.
    4080ca49 cmLocalGenerator: Inline ReadListFile method.
    ad706819 cmLocalGenerator: Devirtualize method.
    6fbd4cae Use cmSystemTools::GetCMakeCommand() to get path to cmake internally


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e54d2fdf50d7e1170f9e3dcbcb62ebacc7205de6
commit e54d2fdf50d7e1170f9e3dcbcb62ebacc7205de6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon May 18 04:54:27 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 20 11:21:10 2015 -0400

    Convert: Remove specification of default parameter.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 0c56838..c2e996c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1838,7 +1838,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
         fdi != fwDirs.end(); ++fdi)
       {
       frameworkPath += fwSearchFlag;
-      frameworkPath += this->Convert(*fdi, NONE, shellFormat, false);
+      frameworkPath += this->Convert(*fdi, NONE, shellFormat);
       frameworkPath += " ";
       }
     }
@@ -1892,7 +1892,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
         ri != runtimeDirs.end(); ++ri)
       {
       rpath += cli.GetRuntimeFlag();
-      rpath += this->Convert(*ri, NONE, shellFormat, false);
+      rpath += this->Convert(*ri, NONE, shellFormat);
       rpath += " ";
       }
     fout << rpath;
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index c001622..450f573 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -626,7 +626,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
       install_name_dir =
         this->LocalGenerator->Convert(install_name_dir,
                                       cmLocalGenerator::NONE,
-                                      cmLocalGenerator::SHELL, false);
+                                      cmLocalGenerator::SHELL);
       vars.TargetInstallNameDir = install_name_dir.c_str();
       }
     }
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 9407011..bbf03ff 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -525,8 +525,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
         {
         vars["INSTALLNAME_DIR"] = localGen.Convert(install_dir,
                                                    cmLocalGenerator::NONE,
-                                                   cmLocalGenerator::SHELL,
-                                                   false);
+                                                   cmLocalGenerator::SHELL);
         }
       }
     }
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index b2c603f..ebec923 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -456,8 +456,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
     std::vector<std::string> includeDirs;
     cmSystemTools::ExpandListArgument(includes, includeDirs);
 
-    std::string includeFlags = lg->GetIncludeFlags(includeDirs, 0,
-                                                   language, false);
+    std::string includeFlags = lg->GetIncludeFlags(includeDirs, 0, language);
 
     std::string definitions = mf->GetSafeDefinition("PACKAGE_DEFINITIONS");
     printf("%s %s\n", includeFlags.c_str(), definitions.c_str());

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20c2fe4d10ac72b8352bdbea361124296a515d6c
commit 20c2fe4d10ac72b8352bdbea361124296a515d6c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue May 19 23:14:18 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 20 11:21:10 2015 -0400

    cmLocalGenerator: Get enabled languages from cmState.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index aab6962..0c56838 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -995,8 +995,8 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
     {
     return this->Convert(cmSystemTools::GetCMakeCommand(), FULL, SHELL);
     }
-  std::vector<std::string> enabledLanguages;
-  this->GlobalGenerator->GetEnabledLanguages(enabledLanguages);
+  std::vector<std::string> enabledLanguages =
+      this->GetState()->GetEnabledLanguages();
   // loop over language specific replace variables
   int pos = 0;
   while(ruleReplaceVars[pos])

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7601a7b12d1c4a3bddb1ca34dcf38e1aea188698
commit 7601a7b12d1c4a3bddb1ca34dcf38e1aea188698
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue May 19 23:10:30 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 20 11:21:09 2015 -0400

    cmLocalGenerator: Implement IsRootMakefile in terms of cmState.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 9db82da..aab6962 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -76,7 +76,7 @@ cmLocalGenerator::~cmLocalGenerator()
 
 bool cmLocalGenerator::IsRootMakefile() const
 {
-  return !this->GetParent();
+  return !this->StateSnapshot.GetParent().IsValid();
 }
 
 //----------------------------------------------------------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4080ca497e9841c73324e8cd4d1017a87065e879
commit 4080ca497e9841c73324e8cd4d1017a87065e879
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue May 19 23:09:46 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 20 11:21:09 2015 -0400

    cmLocalGenerator: Inline ReadListFile method.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 118d5a3..9db82da 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -115,8 +115,10 @@ void cmLocalGenerator::Configure()
   filesDir += cmake::GetCMakeFilesDirectory();
   cmSystemTools::MakeDirectory(filesDir.c_str());
 
-  // find & read the list file
-  this->ReadInputFile();
+  std::string currentStart = this->StateSnapshot.GetCurrentSourceDirectory();
+  currentStart += "/CMakeLists.txt";
+  assert(cmSystemTools::FileExists(currentStart.c_str(), true));
+  this->Makefile->ProcessBuildsystemFile(currentStart.c_str());
 
   // at the end of the ReadListFile handle any old style subdirs
   // first get all the subdirectories
@@ -183,16 +185,6 @@ void cmLocalGenerator::ComputeObjectMaxPath()
   this->ObjectMaxPathViolations.clear();
 }
 
-//----------------------------------------------------------------------------
-void cmLocalGenerator::ReadInputFile()
-{
-  // Look for the CMakeLists.txt file.
-  std::string currentStart = this->StateSnapshot.GetCurrentSourceDirectory();
-  currentStart += "/CMakeLists.txt";
-  assert(cmSystemTools::FileExists(currentStart.c_str(), true));
-  this->Makefile->ProcessBuildsystemFile(currentStart.c_str());
-}
-
 void cmLocalGenerator::ConfigureFinalPass()
 {
   this->Makefile->ConfigureFinalPass();
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 14fa28e..3fca225 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -447,9 +447,6 @@ protected:
       definition.  Issues a warning.  */
   virtual bool CheckDefinition(std::string const& define) const;
 
-  /** Read the input CMakeLists.txt file.  */
-  void ReadInputFile();
-
   cmMakefile *Makefile;
   cmState::Snapshot StateSnapshot;
   cmGlobalGenerator *GlobalGenerator;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad70681909c75d266e297725eadd9f47e9bf001f
commit ad70681909c75d266e297725eadd9f47e9bf001f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue May 19 09:47:18 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 20 11:21:09 2015 -0400

    cmLocalGenerator: Devirtualize method.

diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 67ac4fd..14fa28e 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -395,7 +395,7 @@ public:
 
 protected:
   ///! put all the libraries for a target on into the given stream
-  virtual void OutputLinkLibraries(std::string& linkLibraries,
+  void OutputLinkLibraries(std::string& linkLibraries,
                                    std::string& frameworkPath,
                                    std::string& linkPath,
                                    cmGeneratorTarget &,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6
commit 6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 20 09:10:52 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 20 11:20:42 2015 -0400

    Use cmSystemTools::GetCMakeCommand() to get path to cmake internally
    
    This is much simpler than finding a way to lookup "CMAKE_COMMAND"
    everywhere.

diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 0137374..5049a3f 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -283,8 +283,6 @@ int cmCPackDebGenerator::PackageFiles()
 
 int cmCPackDebGenerator::createDeb()
 {
-  const char* cmakeExecutable = this->GetOption("CMAKE_COMMAND");
-
   // debian-binary file
   std::string dbfilename;
     dbfilename += this->GetOption("GEN_WDIR");
@@ -420,15 +418,15 @@ int cmCPackDebGenerator::createDeb()
   } else if(!strcmp(debian_compression_type, "bzip2")) {
       compression_suffix = ".bz2";
       compression_modifier = "j";
-      cmake_tar += "\"" + std::string(cmakeExecutable) + "\" -E ";
+      cmake_tar += "\"" + cmSystemTools::GetCMakeCommand() + "\" -E ";
   } else if(!strcmp(debian_compression_type, "gzip")) {
       compression_suffix = ".gz";
       compression_modifier = "z";
-      cmake_tar += "\"" + std::string(cmakeExecutable) + "\" -E ";
+      cmake_tar += "\"" + cmSystemTools::GetCMakeCommand() + "\" -E ";
   } else if(!strcmp(debian_compression_type, "none")) {
       compression_suffix = "";
       compression_modifier = "";
-      cmake_tar += "\"" + std::string(cmakeExecutable) + "\" -E ";
+      cmake_tar += "\"" + cmSystemTools::GetCMakeCommand() + "\" -E ";
   } else {
       cmCPackLogger(cmCPackLog::LOG_ERROR,
                     "Error unrecognized compression type: "
@@ -501,7 +499,7 @@ int cmCPackDebGenerator::createDeb()
             fileIt != packageFiles.end(); ++ fileIt )
       {
       cmd = "\"";
-      cmd += cmakeExecutable;
+      cmd += cmSystemTools::GetCMakeCommand();
       cmd += "\" -E md5sum \"";
       cmd += *fileIt;
       cmd += "\"";
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 289d0dc..108208e 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -407,14 +407,9 @@ bool cmCacheManager::SaveCache(const std::string& path)
                       " was created", cmState::INTERNAL);
 
   fout << "# This is the CMakeCache file.\n"
-       << "# For build in directory: " << currentcwd << "\n";
-  cmCacheManager::CacheEntry* cmakeCacheEntry
-    = this->GetCacheEntry("CMAKE_COMMAND");
-  if ( cmakeCacheEntry )
-    {
-    fout << "# It was generated by CMake: " <<
-      cmakeCacheEntry->Value << std::endl;
-    }
+       << "# For build in directory: " << currentcwd << "\n"
+       << "# It was generated by CMake: "
+       << cmSystemTools::GetCMakeCommand() << std::endl;
 
   fout << "# You can edit this file to change values found and used by cmake."
        << std::endl
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 72a6a30..a81e53c 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -1008,7 +1008,6 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
   const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
   const std::string makeArgs = mf->GetSafeDefinition(
                                                "CMAKE_ECLIPSE_MAKE_ARGUMENTS");
-  const std::string cmake = mf->GetRequiredDefinition("CMAKE_COMMAND");
 
   cmGlobalGenerator* generator
     = const_cast<cmGlobalGenerator*>(this->GlobalGenerator);
@@ -1096,11 +1095,12 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
           std::string cleanArgs = "-E chdir \"";
           cleanArgs += makefile->GetCurrentBinaryDirectory();
           cleanArgs += "\" \"";
-          cleanArgs += cmake;
+          cleanArgs += cmSystemTools::GetCMakeCommand();
           cleanArgs += "\" -P \"";
           cleanArgs += (*it)->GetTargetDirectory(ti->second);
           cleanArgs += "/cmake_clean.cmake\"";
-          this->AppendTarget(fout, "Clean", cmake, cleanArgs, virtDir, "", "");
+          this->AppendTarget(fout, "Clean", cmSystemTools::GetCMakeCommand(),
+                             cleanArgs, virtDir, "", "");
           }
          }
          break;
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index ec141a9..578e7d3 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -247,7 +247,7 @@ cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
     return;
     }
 
-  fout << "#Generated by " << mf->GetRequiredDefinition("CMAKE_COMMAND")
+  fout << "#Generated by " << cmSystemTools::GetCMakeCommand()
        << ", do not edit.\n";
 }
 
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1ca2c95..75d6186 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2151,7 +2151,6 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 {
   cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
   const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir();
-  const char* cmakeCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
 
   // CPack
   std::string workingDir =  mf->GetCurrentBinaryDirectory();
@@ -2266,7 +2265,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
       }
     else
       {
-      singleLine.push_back(cmakeCommand);
+      singleLine.push_back(cmSystemTools::GetCMakeCommand());
       singleLine.push_back("-E");
       singleLine.push_back("echo");
       singleLine.push_back("No interactive CMake dialog available.");
@@ -2287,7 +2286,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
                             cpackCommandLines.end());
     singleLine.erase(singleLine.begin(), singleLine.end());
     depends.erase(depends.begin(), depends.end());
-    singleLine.push_back(cmakeCommand);
+    singleLine.push_back(cmSystemTools::GetCMakeCommand());
     singleLine.push_back("-H$(CMAKE_SOURCE_DIR)");
     singleLine.push_back("-B$(CMAKE_BINARY_DIR)");
     cpackCommandLines.push_back(singleLine);
@@ -2329,7 +2328,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
           ostr.str().c_str(),
           &cpackCommandLines, depends, 0, /*uses_terminal*/false);
       }
-    std::string cmd = cmakeCommand;
+    std::string cmd = cmSystemTools::GetCMakeCommand();
     cpackCommandLines.erase(cpackCommandLines.begin(),
       cpackCommandLines.end());
     singleLine.erase(singleLine.begin(), singleLine.end());
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index e064b84..24fe16e 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -330,12 +330,10 @@ void
 cmGlobalNinjaGenerator::AddMacOSXContentRule()
 {
   cmLocalGenerator *lg = this->LocalGenerators[0];
-  cmMakefile* mfRoot = lg->GetMakefile();
 
   std::ostringstream cmd;
-  cmd << lg->ConvertToOutputFormat(
-           mfRoot->GetRequiredDefinition("CMAKE_COMMAND"),
-           cmLocalGenerator::SHELL)
+  cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
+                                   cmLocalGenerator::SHELL)
       << " -E copy $in $out";
 
   this->AddRule("COPY_OSX_CONTENT",
@@ -1185,9 +1183,8 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
   cmMakefile* mfRoot = lg->GetMakefile();
 
   std::ostringstream cmd;
-  cmd << lg->ConvertToOutputFormat(
-           mfRoot->GetRequiredDefinition("CMAKE_COMMAND"),
-           cmLocalGenerator::SHELL)
+  cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
+                                   cmLocalGenerator::SHELL)
       << " -H"
       << lg->ConvertToOutputFormat(mfRoot->GetHomeDirectory(),
                                    cmLocalGenerator::SHELL)
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 6d0dd36..4565f36 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -252,7 +252,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
     return false;
     }
 
-  std::string cmake_command = mf->GetRequiredDefinition("CMAKE_COMMAND");
   cmCustomCommandLines noCommandLines;
   cmTarget* tgt =
     mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false,
@@ -310,9 +309,8 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
   // Create a rule to re-run CMake.
   std::string stampName = cmake::GetCMakeFilesDirectoryPostSlash();
   stampName += "generate.stamp";
-  const char* dsprule = mf->GetRequiredDefinition("CMAKE_COMMAND");
   cmCustomCommandLine commandLine;
-  commandLine.push_back(dsprule);
+  commandLine.push_back(cmSystemTools::GetCMakeCommand());
   std::string argH = "-H";
   argH += lg->Convert(mf->GetHomeDirectory(),
                       cmLocalGenerator::START_OUTPUT,
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 4a7411c..0753235 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -582,8 +582,8 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
     {
     makefileStream << "\\\n" << this->ConvertToRelativeForMake(i->c_str());
     }
-  std::string cmake = mf->GetRequiredDefinition("CMAKE_COMMAND");
-  makefileStream << "\n\t" << this->ConvertToRelativeForMake(cmake.c_str())
+  makefileStream << "\n\t" <<
+    this->ConvertToRelativeForMake(cmSystemTools::GetCMakeCommand().c_str())
                  << " -H" << this->ConvertToRelativeForMake(
                    mf->GetHomeDirectory())
                  << " -B" << this->ConvertToRelativeForMake(
@@ -1447,7 +1447,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
     {
     cmCustomCommandLines cmd;
     cmd.resize(1);
-    cmd[0].push_back(this->CurrentMakefile->GetDefinition("CMAKE_COMMAND"));
+    cmd[0].push_back(cmSystemTools::GetCMakeCommand());
     cmd[0].push_back("-E");
     cmd[0].push_back("cmake_symlink_library");
     std::string str_file = "$<TARGET_FILE:";
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 0f18225..118d5a3 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1001,9 +1001,7 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
     }
   if(variable == "CMAKE_COMMAND")
     {
-    const char* cmcommand =
-      this->GetMakefile()->GetDefinition("CMAKE_COMMAND");
-    return this->Convert(cmcommand, FULL, SHELL);
+    return this->Convert(cmSystemTools::GetCMakeCommand(), FULL, SHELL);
     }
   std::vector<std::string> enabledLanguages;
   this->GlobalGenerator->GetEnabledLanguages(enabledLanguages);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index f2e0a01..b68dc51 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -744,18 +744,16 @@ cmLocalUnixMakefileGenerator3
 #endif
     }
 
-  std::string cmakecommand =
-      this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
   makefileStream
     << "# The CMake executable.\n"
     << "CMAKE_COMMAND = "
-    << this->ConvertShellCommand(cmakecommand, FULL)
+    << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), FULL)
     << "\n"
     << "\n";
   makefileStream
     << "# The command to remove a file.\n"
     << "RM = "
-    << this->ConvertShellCommand(cmakecommand, FULL)
+    << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), FULL)
     << " -E remove -f\n"
     << "\n";
   makefileStream
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 8dc9836..7afb53a 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -221,10 +221,8 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
 {
   std::string dspname = GetVS6TargetName(tgt.GetName());
   dspname += ".dsp.cmake";
-  const char* dsprule =
-    this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
   cmCustomCommandLine commandLine;
-  commandLine.push_back(dsprule);
+  commandLine.push_back(cmSystemTools::GetCMakeCommand());
   std::string makefileIn = this->Makefile->GetCurrentSourceDirectory();
   makefileIn += "/";
   makefileIn += "CMakeLists.txt";
@@ -817,7 +815,7 @@ cmLocalVisualStudio6Generator::MaybeCreateOutputDir(cmTarget& target,
 
   // Add a pre-link event to create the directory.
   cmCustomCommandLine command;
-  command.push_back(this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"));
+  command.push_back(cmSystemTools::GetCMakeCommand());
   command.push_back("-E");
   command.push_back("make_directory");
   command.push_back(outDir);
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 1d27086..05556d8 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -290,10 +290,8 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
   stampName += "/";
   stampName += cmake::GetCMakeFilesDirectoryPostSlash();
   stampName += "generate.stamp";
-  const char* dsprule =
-    this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
   cmCustomCommandLine commandLine;
-  commandLine.push_back(dsprule);
+  commandLine.push_back(cmSystemTools::GetCMakeCommand());
   std::string makefileIn = this->Makefile->GetCurrentSourceDirectory();
   makefileIn += "/";
   makefileIn += "CMakeLists.txt";
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 2fd0387..f472bba 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -99,7 +99,7 @@ cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmTarget& target,
 
   // Add a pre-build event to create the directory.
   cmCustomCommandLine command;
-  command.push_back(this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"));
+  command.push_back(cmSystemTools::GetCMakeCommand());
   command.push_back("-E");
   command.push_back("make_directory");
   command.push_back(impDir);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 3e19cbb..2e7e6bc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3575,7 +3575,6 @@ int cmMakefile::TryCompile(const std::string& srcdir,
   // make sure the same generator is used
   // use this program as the cmake to be run, it should not
   // be run that way but the cmake object requires a vailid path
-  std::string cmakeCommand = this->GetDefinition("CMAKE_COMMAND");
   cmake cm;
   cm.SetIsInTryCompile(true);
   cmGlobalGenerator *gg = cm.CreateGlobalGenerator
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 7f9c09f..9407011 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -282,8 +282,7 @@ cmNinjaNormalTargetGenerator
     !this->GetTarget()->IsFrameworkOnApple()) {
     std::string cmakeCommand =
       this->GetLocalGenerator()->ConvertToOutputFormat(
-        this->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"),
-        cmLocalGenerator::SHELL);
+        cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
     if (targetType == cmTarget::EXECUTABLE)
       this->GetGlobalGenerator()->AddRule("CMAKE_SYMLINK_EXECUTABLE",
                                           cmakeCommand +
@@ -337,8 +336,7 @@ cmNinjaNormalTargetGenerator
       {
       std::string cmakeCommand =
         this->GetLocalGenerator()->ConvertToOutputFormat(
-          mf->GetRequiredDefinition("CMAKE_COMMAND"),
-          cmLocalGenerator::SHELL);
+          cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
       linkCmds.push_back(cmakeCommand + " -E remove $TARGET_FILE");
       }
       // TODO: Use ARCHIVE_APPEND for archives over a certain size.
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 3e7989f..a683c2a 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -320,7 +320,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
   std::string targetDir = getAutogenTargetDir(target);
 
   cmCustomCommandLine currentLine;
-  currentLine.push_back(makefile->GetSafeDefinition("CMAKE_COMMAND"));
+  currentLine.push_back(cmSystemTools::GetCMakeCommand());
   currentLine.push_back("-E");
   currentLine.push_back("cmake_autogen");
   currentLine.push_back(targetDir);

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list