[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7064-ge193e89

Brad King brad.king at kitware.com
Mon Jan 13 10:10:34 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  e193e89870b0225740902fc0ccda2e15ce02e27d (commit)
       via  6fac24d750a3ed25c0c58c682a326293d02b7369 (commit)
      from  4f385561d3a683966520246dd7d7a255f106df86 (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=e193e89870b0225740902fc0ccda2e15ce02e27d
commit e193e89870b0225740902fc0ccda2e15ce02e27d
Merge: 4f38556 6fac24d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 13 10:10:32 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 13 10:10:32 2014 -0500

    Merge topic 'ninja_fix_rerun' into next
    
    6fac24d7 Ninja: Avoid re-running CMake on next build after regeneration


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fac24d750a3ed25c0c58c682a326293d02b7369
commit 6fac24d750a3ed25c0c58c682a326293d02b7369
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Jan 9 13:18:18 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 13 10:09:48 2014 -0500

    Ninja: Avoid re-running CMake on next build after regeneration
    
    In commit 4a6397a7 (Ninja: Track configured files so we can regenerate
    them, 2013-06-17) we accidentally started listing files generated by
    CMake as inputs to the configuration process instead of outputs from it.
    Move the list of files generated by CMake to the regeneration rule
    outputs section and tell Ninja to restat after running it.

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 61d0272..3e4e506 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1086,27 +1086,46 @@ 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());
   }
+
+  //Add the CMakeCache.txt file to the implicit depends so that we catch
+  //when somebody manually modifies the file.
+  implicitDeps.push_back("CMakeCache.txt");
+
+  //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:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list