[Cmake-commits] CMake branch, next, updated. v3.0.2-5672-g90b68bb

Brad King brad.king at kitware.com
Wed Oct 8 08:59:09 EDT 2014


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  90b68bb235ab387fd7c550de28e899f4ea953f47 (commit)
       via  de8e534b4141e0300c0329c47387de9635e3024f (commit)
       via  734580a8db6526c90a5f12f42a78adfdb6364887 (commit)
      from  e8050e0c179cadfe3004cce8c9d36f187b7567ea (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=90b68bb235ab387fd7c550de28e899f4ea953f47
commit 90b68bb235ab387fd7c550de28e899f4ea953f47
Merge: e8050e0 de8e534
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 8 08:59:06 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 8 08:59:06 2014 -0400

    Merge topic 'ninja-phony-rules-only-in-build-tree' into next
    
    de8e534b Ninja: Limit custom command side-effects to build folder
    734580a8 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de8e534b4141e0300c0329c47387de9635e3024f
commit de8e534b4141e0300c0329c47387de9635e3024f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 8 08:49:05 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 8 08:50:15 2014 -0400

    Ninja: Limit custom command side-effects to build folder
    
    Revert commit 7243c951 (Ninja: Don't limit custom cmd side-effects to
    build folder, 2014-06-27) because it causes every custom command
    dependency in the source tree to get a phony rule.  For large projects
    these rules get too big for Ninja to handle efficiently.  While the
    original change addressed a valid concern, it did not seem to occur
    regularly in practice because well-behaved projects generate their
    side-effects only in the build tree.  Until we support explicit
    specification of side-effects (CMake issue #14963), we will have to use
    this as a middle-ground.

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index f391203..6e7b06b 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1042,17 +1042,27 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
                       std::back_inserter(unkownExplicitDepends));
 
 
+  std::string const rootBuildDirectory =
+      this->GetCMakeInstance()->GetHomeOutputDirectory();
   for (std::vector<std::string>::const_iterator
        i = unkownExplicitDepends.begin();
        i != unkownExplicitDepends.end();
        ++i)
     {
-    cmNinjaDeps deps(1,*i);
-    this->WritePhonyBuild(os,
-                          "",
-                          deps,
-                          deps);
-    }
+    //verify the file is in the build directory
+    std::string const absDepPath = cmSystemTools::CollapseFullPath(
+                                     i->c_str(), rootBuildDirectory.c_str());
+    bool const inBuildDir = cmSystemTools::IsSubDirectory(absDepPath.c_str(),
+                                                  rootBuildDirectory.c_str());
+    if(inBuildDir)
+      {
+      cmNinjaDeps deps(1,*i);
+      this->WritePhonyBuild(os,
+                            "",
+                            deps,
+                            deps);
+      }
+   }
 }
 
 void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os)

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

Summary of changes:
 Source/CMakeVersion.cmake         |    2 +-
 Source/cmGlobalNinjaGenerator.cxx |   22 ++++++++++++++++------
 2 files changed, 17 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list