[Cmake-commits] CMake branch, next, updated. v2.8.7-3188-g61e7161

Peter Collingbourne peter at pcc.me.uk
Sat Mar 17 19:24:52 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  61e71612d6e39d3366a0a08ae0fd0da82a000339 (commit)
       via  60bec54ef644e5c85578ec4a9b24dd2b2cb11e2b (commit)
       via  9077adfc528957a929b19f0375752a46ec74ceb9 (commit)
      from  5a3413f8c7ad7995e44b8c306c00cba57902d62c (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=61e71612d6e39d3366a0a08ae0fd0da82a000339
commit 61e71612d6e39d3366a0a08ae0fd0da82a000339
Merge: 5a3413f 60bec54
Author:     Peter Collingbourne <peter at pcc.me.uk>
AuthorDate: Sat Mar 17 19:24:46 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Mar 17 19:24:46 2012 -0400

    Merge topic 'ninja-generator' into next
    
    60bec54 Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR)
    9077adf Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60bec54ef644e5c85578ec4a9b24dd2b2cb11e2b
commit 60bec54ef644e5c85578ec4a9b24dd2b2cb11e2b
Author:     Peter Collingbourne <peter at pcc.me.uk>
AuthorDate: Sat Mar 17 20:55:09 2012 +0000
Commit:     Peter Collingbourne <peter at pcc.me.uk>
CommitDate: Sat Mar 17 23:16:40 2012 +0000

    Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR)

diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 8eeca77..9c2fd13 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -78,10 +78,18 @@ void cmNinjaUtilityTargetGenerator::Generate()
 
     // TODO: fix problematic global targets.  For now, search and replace the
     // makefile vars.
-    cmSystemTools::ReplaceString(command, "$(CMAKE_SOURCE_DIR)",
-                         this->GetTarget()->GetMakefile()->GetHomeDirectory());
-    cmSystemTools::ReplaceString(command, "$(CMAKE_BINARY_DIR)",
-                   this->GetTarget()->GetMakefile()->GetHomeOutputDirectory());
+    cmSystemTools::ReplaceString(
+      command,
+      "$(CMAKE_SOURCE_DIR)",
+      this->GetLocalGenerator()->ConvertToOutputFormat(
+        this->GetTarget()->GetMakefile()->GetHomeDirectory(),
+        cmLocalGenerator::SHELL).c_str());
+    cmSystemTools::ReplaceString(
+      command,
+      "$(CMAKE_BINARY_DIR)",
+      this->GetLocalGenerator()->ConvertToOutputFormat(
+        this->GetTarget()->GetMakefile()->GetHomeOutputDirectory(),
+        cmLocalGenerator::SHELL).c_str());
     cmSystemTools::ReplaceString(command, "$(ARGS)", "");
 
     if (command.find('$') != std::string::npos)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9077adfc528957a929b19f0375752a46ec74ceb9
commit 9077adfc528957a929b19f0375752a46ec74ceb9
Author:     Peter Collingbourne <peter at pcc.me.uk>
AuthorDate: Sat Mar 17 20:49:36 2012 +0000
Commit:     Peter Collingbourne <peter at pcc.me.uk>
CommitDate: Sat Mar 17 23:16:40 2012 +0000

    Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case

diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b9f997d..9acbc67 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -475,6 +475,17 @@ cmNinjaTargetGenerator
                                      emptyDeps,
                                      orderOnlyDeps,
                                      vars);
+
+  if(const char* objectOutputs = source->GetProperty("OBJECT_OUTPUTS")) {
+    std::vector<std::string> outputList;
+    cmSystemTools::ExpandListArgument(objectOutputs, outputList);
+    std::transform(outputList.begin(), outputList.end(), outputList.begin(),
+                   MapToNinjaPath());
+    cmGlobalNinjaGenerator::WritePhonyBuild(this->GetBuildFileStream(),
+                                            "Additional output files.",
+                                            outputList,
+                                            outputs);
+  }
 }
 
 //----------------------------------------------------------------------------
diff --git a/Tests/PrecompiledHeader/CMakeLists.txt b/Tests/PrecompiledHeader/CMakeLists.txt
index d423cae..3374e32 100644
--- a/Tests/PrecompiledHeader/CMakeLists.txt
+++ b/Tests/PrecompiledHeader/CMakeLists.txt
@@ -47,7 +47,8 @@ SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES
 
 # Setup dependencies for precompiled header creation and use.  The VS
 # IDE takes care of this automatically.
-IF("${CMAKE_GENERATOR}" MATCHES "Makefile")
+IF("${CMAKE_GENERATOR}" MATCHES "Makefile" OR
+   "${CMAKE_GENERATOR}" MATCHES "Ninja")
   # This source file creates the precompiled header as a side-effect.
   SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES
     OBJECT_OUTPUTS "${PCH_DIR}/foo_precompiled.pch")

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

Summary of changes:
 Source/cmNinjaTargetGenerator.cxx        |   11 +++++++++++
 Source/cmNinjaUtilityTargetGenerator.cxx |   16 ++++++++++++----
 Tests/PrecompiledHeader/CMakeLists.txt   |    3 ++-
 3 files changed, 25 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list