[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6930-g4b343f0

Robert Maynard robert.maynard at kitware.com
Thu Jan 9 16:56:52 EST 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  4b343f0c08060d81bc7fb7d20973d5383ae24409 (commit)
       via  ea9c30e39bff5b2316bc5f6bc607a4813da8001d (commit)
      from  5233a3ddc6e6a79f1374c86839eb5c74fde4d2ca (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=4b343f0c08060d81bc7fb7d20973d5383ae24409
commit 4b343f0c08060d81bc7fb7d20973d5383ae24409
Merge: 5233a3d ea9c30e
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Jan 9 16:56:51 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 9 16:56:51 2014 -0500

    Merge topic 'ninja_fix_rerun' into next
    
    ea9c30e Ninja generator was incorrectly marking dependencies as out of date.

diff --cc Source/cmGlobalNinjaGenerator.cxx
index ec91b0f,7ff3ef4..834ef9b
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@@ -1104,13 -1084,13 +1104,14 @@@ void cmGlobalNinjaGenerator::WriteTarge
              "Re-running CMake...",
              "Rule for re-running cmake.",
              /*depfile=*/ "",
 +            /*deptype=*/ "",
              /*rspfile=*/ "",
              /*rspcontent*/ "",
-             /*restat=*/ false,
+             /*restat=*/ true,
              /*generator=*/ true);
  
-   cmNinjaDeps implicitDeps;
+   cmNinjaDeps implicitDeps, outputs, temp;
+   outputs.push_back(NINJA_BUILD_FILE);
    for (std::vector<cmLocalGenerator *>::const_iterator i =
         this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) {
      const std::vector<std::string>& lf = (*i)->GetMakefile()->GetListFiles();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea9c30e39bff5b2316bc5f6bc607a4813da8001d
commit ea9c30e39bff5b2316bc5f6bc607a4813da8001d
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Jan 9 13:18:18 2014 -0500
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Thu Jan 9 15:20:42 2014 -0500

    Ninja generator was incorrectly marking dependencies as out of date.
    
    Setting the generated as an implicit dependency of cmake caused errors when
    we generated directories on machines as part of the build process. We can fix
    this by moving these to be order only dependencies.

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 61d0272..7ff3ef4 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1086,27 +1086,42 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
             /*depfile=*/ "",
             /*rspfile=*/ "",
             /*rspcontent*/ "",
-            /*restat=*/ false,
+            /*restat=*/ true,
             /*generator=*/ true);
 
-  cmNinjaDeps implicitDeps;
+  cmNinjaDeps implicitDeps, outputs, temp;
+  outputs.push_back(NINJA_BUILD_FILE);
   for (std::vector<cmLocalGenerator *>::const_iterator i =
        this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) {
     const std::vector<std::string>& lf = (*i)->GetMakefile()->GetListFiles();
     implicitDeps.insert(implicitDeps.end(), lf.begin(), lf.end());
 
     const std::vector<std::string>& of = (*i)->GetMakefile()->GetOutputFiles();
-    implicitDeps.insert(implicitDeps.end(), of.begin(), of.end());
+    temp.insert(temp.end(), of.begin(), of.end());
   }
+
+  //make sure nothing is in implicit depends twice
   std::sort(implicitDeps.begin(), implicitDeps.end());
   implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()),
                      implicitDeps.end());
   implicitDeps.push_back("CMakeCache.txt");
 
+  //make sure nothing is in outputs depends twice
+  std::sort(temp.begin(), temp.end());
+  temp.erase(std::unique(temp.begin(), temp.end()),
+                     temp.end());
+
+  //make sure that anything that is in implicitDeps is also NOT in outputs
+  std::set_difference(temp.begin(),
+                      temp.end(),
+                      implicitDeps.begin(),
+                      implicitDeps.end(),
+                      std::back_inserter(outputs));
+
   this->WriteBuild(os,
                    "Re-run CMake if any of its inputs changed.",
                    "RERUN_CMAKE",
-                   /*outputs=*/ cmNinjaDeps(1, NINJA_BUILD_FILE),
+                   outputs,
                    /*explicitDeps=*/ cmNinjaDeps(),
                    implicitDeps,
                    /*orderOnlyDeps=*/ cmNinjaDeps(),

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

Summary of changes:
 Source/cmGlobalNinjaGenerator.cxx |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list