[Cmake-commits] CMake branch, next, updated. v2.8.12-4919-g734ea51

Peter Kuemmel syntheticpp at gmx.net
Tue Nov 5 11:48:21 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  734ea519ea79af7a438adf1d3a7eea6fa63ec323 (commit)
       via  0a39685fa6a986eae86ca9868e44cbc38da3cddf (commit)
      from  c773200186f13747b55bbd1e938644312c9cfc1f (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=734ea519ea79af7a438adf1d3a7eea6fa63ec323
commit 734ea519ea79af7a438adf1d3a7eea6fa63ec323
Merge: c773200 0a39685
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Tue Nov 5 11:48:05 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 5 11:48:05 2013 -0500

    Merge topic 'ninja-edit-cache' into next
    
    0a39685 Ninja: run cmake-gui for target edit_cache


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a39685fa6a986eae86ca9868e44cbc38da3cddf
commit 0a39685fa6a986eae86ca9868e44cbc38da3cddf
Author:     Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Tue Nov 5 17:35:18 2013 +0100
Commit:     Peter Kümmel <syntheticpp at gmx.net>
CommitDate: Tue Nov 5 17:35:18 2013 +0100

    Ninja: run cmake-gui for target edit_cache
    
    Ninja can't run commands interactively,
    this will never work with ninja by design,
    so start cmake-gui instead.
    
    http://cmake.org/Bug/view.php?id=14544

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index dd7311e..16d80e4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2046,6 +2046,11 @@ void cmGlobalGenerator::SetCMakeInstance(cmake* cm)
   this->CMakeInstance = cm;
 }
 
+const char* cmGlobalGenerator::GetEditCacheCommand(cmMakefile* mf) const
+{
+  return mf->GetDefinition("CMAKE_EDIT_COMMAND");
+}
+
 void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 {
   cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
@@ -2152,9 +2157,9 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 
     // Use CMAKE_EDIT_COMMAND for the edit_cache rule if it is defined.
     // Otherwise default to the interactive command-line interface.
-    if(mf->GetDefinition("CMAKE_EDIT_COMMAND"))
+    if (this->GetEditCacheCommand(mf))
       {
-      singleLine.push_back(mf->GetDefinition("CMAKE_EDIT_COMMAND"));
+      singleLine.push_back(this->GetEditCacheCommand(mf));
       singleLine.push_back("-H$(CMAKE_SOURCE_DIR)");
       singleLine.push_back("-B$(CMAKE_BINARY_DIR)");
       cpackCommandLines.push_back(singleLine);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 4d6e10f..cae3ff5 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -409,6 +409,8 @@ private:
   typedef std::map<cmTarget *, TargetDependSet> TargetDependMap;
   TargetDependMap TargetDependencies;
 
+  virtual const char* GetEditCacheCommand(cmMakefile* mf) const;
+
   // Per-target generator information.
   cmGeneratorTargetsType GeneratorTargets;
   void CreateGeneratorTargets();
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index d262397..6e45f21 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1199,3 +1199,10 @@ void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os)
              /*orderOnlyDeps=*/ cmNinjaDeps(),
              /*variables=*/ cmNinjaVars());
 }
+
+
+const char* cmGlobalNinjaGenerator::GetEditCacheCommand(cmMakefile* mf) const
+{
+  const char* cmd = mf->GetDefinition("CMAKE_EDIT_COMMAND");
+  return cmd ? cmd : "cmake-gui";
+}
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index be58df1..03d0252 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -222,6 +222,7 @@ public:
   }
   virtual const char* GetCleanTargetName()         const { return "clean"; }
 
+  virtual const char* GetEditCacheCommand(cmMakefile* mf) const;
 
   cmGeneratedFileStream* GetBuildFileStream() const {
     return this->BuildFileStream; }

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

Summary of changes:
 Source/cmGlobalGenerator.cxx      |    9 +++++++--
 Source/cmGlobalGenerator.h        |    2 ++
 Source/cmGlobalNinjaGenerator.cxx |    7 +++++++
 Source/cmGlobalNinjaGenerator.h   |    1 +
 4 files changed, 17 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list