[Cmake-commits] CMake branch, next, updated. v2.8.8-3184-g97eed5a

Peter Kuemmel syntheticpp at gmx.net
Fri Jun 15 06:20:15 EDT 2012


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  97eed5ac2906f84569e15a5984db6dafe00b823f (commit)
       via  2fb07fc44c49da70a609fbc0df013c0301e9f36a (commit)
       via  518c06585b07c1b7a189374c9196fc1a7fc3502d (commit)
      from  2f61975b8b3125e03d6c7d01b6ca833d75bff1a1 (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=97eed5ac2906f84569e15a5984db6dafe00b823f
commit 97eed5ac2906f84569e15a5984db6dafe00b823f
Merge: 2f61975 2fb07fc
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Fri Jun 15 06:20:13 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jun 15 06:20:13 2012 -0400

    Merge topic 'ninja-cldeps' into next
    
    2fb07fc Ninja: Eclipse and KDevelop fixes for ninja
    518c065 Ninja: don't pollute build dir with preprocessed rc files


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2fb07fc44c49da70a609fbc0df013c0301e9f36a
commit 2fb07fc44c49da70a609fbc0df013c0301e9f36a
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Fri Jun 15 12:14:13 2012 +0200
Commit:     Peter Kuemmel <syntheticpp at gmx.net>
CommitDate: Fri Jun 15 12:14:13 2012 +0200

    Ninja: Eclipse and KDevelop fixes for ninja
    
    Thx to Claus Klein

diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 65077b3..af0a95b 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -34,6 +34,9 @@ cmExtraEclipseCDT4Generator
   this->SupportedGlobalGenerators.push_back("MinGW Makefiles");
 //  this->SupportedGlobalGenerators.push_back("MSYS Makefiles");
 #endif
+#ifdef CMAKE_USE_NINJA
+  this->SupportedGlobalGenerators.push_back("Ninja");
+#endif
   this->SupportedGlobalGenerators.push_back("Unix Makefiles");
 
   this->SupportsVirtualFolders = true;
@@ -1067,9 +1070,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
       }
 
     //insert rules for compiling, preprocessing and assembling individual files
-    cmLocalUnixMakefileGenerator3* lumg=(cmLocalUnixMakefileGenerator3*)*it;
     std::vector<std::string> objectFileTargets;
-    lumg->GetIndividualFileTargets(objectFileTargets);
+    (*it)->GetIndividualFileTargets(objectFileTargets);
     for(std::vector<std::string>::const_iterator fit=objectFileTargets.begin();
         fit != objectFileTargets.end();
         ++fit)
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx
index 56b9e9c..f699448 100644
--- a/Source/cmGlobalKdevelopGenerator.cxx
+++ b/Source/cmGlobalKdevelopGenerator.cxx
@@ -44,6 +44,9 @@ cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator()
 :cmExternalMakefileProjectGenerator()
 {
   this->SupportedGlobalGenerators.push_back("Unix Makefiles");
+#ifdef CMAKE_USE_NINJA
+  this->SupportedGlobalGenerators.push_back("Ninja");
+#endif
 }
 
 void cmGlobalKdevelopGenerator::Generate()
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 30a4a07..5c9f039 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -928,11 +928,22 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
                   cmNinjaDeps());
 }
 
+std::string cmGlobalNinjaGenerator::ninjaCmd() const
+{
+  cmLocalGenerator* lgen = this->LocalGenerators[0];
+  if (lgen) {
+    return lgen->ConvertToOutputFormat(
+             lgen->GetMakefile()->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"),
+                                    cmLocalGenerator::SHELL);
+  }
+  return "ninja";
+}
+
 void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
 {
   WriteRule(*this->RulesFileStream,
             "CLEAN",
-            "ninja -t clean",
+            (ninjaCmd() + " -t clean").c_str(),
             "Cleaning all built files...",
             "Rule for cleaning all built files.",
             /*depfile=*/ "",
@@ -953,7 +964,7 @@ void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os)
 {
   WriteRule(*this->RulesFileStream,
             "HELP",
-            "ninja -t targets",
+            (ninjaCmd() + " -t tagets").c_str(),
             "All primary targets available:",
             "Rule for printing all primary targets available.",
             /*depfile=*/ "",
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 2055375..56c5ca4 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -317,6 +317,8 @@ private:
     ASD.insert(deps.begin(), deps.end());
   }
 
+  std::string cmGlobalNinjaGenerator::ninjaCmd() const;
+
 private:
   /// The file containing the build statement. (the relation ship of the
   /// compilation DAG).
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index f53700a..fe3c8ca 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -204,6 +204,10 @@ public:
   /** Compute the language used to compile the given source file.  */
   const char* GetSourceFileLanguage(const cmSourceFile& source);
 
+  // Fill the vector with the target names for the object files,
+  // preprocessed files and assembly files.
+  virtual void GetIndividualFileTargets(std::vector<std::string>& targets) {}
+
   // Create a struct to hold the varibles passed into
   // ExpandRuleVariables
   struct RuleVariables

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=518c06585b07c1b7a189374c9196fc1a7fc3502d
commit 518c06585b07c1b7a189374c9196fc1a7fc3502d
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Fri Jun 15 10:40:04 2012 +0200
Commit:     Peter Kuemmel <syntheticpp at gmx.net>
CommitDate: Fri Jun 15 10:40:04 2012 +0200

    Ninja: don't pollute build dir with preprocessed rc files

diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 65a44a8..d2c22a2 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -698,7 +698,7 @@ int main() {
     // rc: src\x\x.rc  ->  cl: /Tc src\x\x.rc
     clrest = replace(clrest, srcfile, "/Tc " + srcfile);
 
-    cl = "\"" + cl + "\" /P /DRC_INVOKED ";
+    cl = "\"" + cl + "\" /EP /DRC_INVOKED ";
 
     // extract dependencies with cl.exe
     process(srcfilename, dfile, objfile,

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

Summary of changes:
 Source/cmExtraEclipseCDT4Generator.cxx |    6 ++++--
 Source/cmGlobalKdevelopGenerator.cxx   |    3 +++
 Source/cmGlobalNinjaGenerator.cxx      |   15 +++++++++++++--
 Source/cmGlobalNinjaGenerator.h        |    2 ++
 Source/cmLocalGenerator.h              |    4 ++++
 Source/cmcldeps.cxx                    |    2 +-
 6 files changed, 27 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list