[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4093-gc6101bc

Brad King brad.king at kitware.com
Mon Sep 9 11:01:50 EDT 2013


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  c6101bcb231e7069bdabd88b83f673f000321c5a (commit)
       via  38571f2c9446343a652cfdccea636028abd9f7aa (commit)
      from  719bc22a69cccaba7a6d788cb98b68925e798f76 (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=c6101bcb231e7069bdabd88b83f673f000321c5a
commit c6101bcb231e7069bdabd88b83f673f000321c5a
Merge: 719bc22 38571f2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 9 11:01:48 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 9 11:01:48 2013 -0400

    Merge topic 'no_track_configured_files' into next
    
    38571f2 cmMakefile: Do not track CMake temporary files.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38571f2c9446343a652cfdccea636028abd9f7aa
commit 38571f2c9446343a652cfdccea636028abd9f7aa
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Sep 3 15:31:12 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 9 10:58:21 2013 -0400

    cmMakefile: Do not track CMake temporary files.
    
    Since commit ad502502 (cmMakefile: Track configured files so we can
    regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
    configured file as an output file generated by CMake.  The intention is
    that for make and ninja we can re-run CMake when one of the files it
    generates goes missing.  However, files configured temporarily in
    CMakeTmp directories by Check* modules do not live past the CMake
    invocation.
    
    We have to also track input files to the configure command.  In theory
    the input to a configure command could it self be a file that is going
    to be deleted later (output from a custom command or configure_file).

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 2506209..cada13a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -817,12 +817,13 @@ bool cmMakefile::NeedBackwardsCompatibility(unsigned int major,
 
 namespace
 {
-  struct file_exists
+  struct file_not_persistent
   {
     bool operator()(const std::string& path) const
-    {
-      return cmSystemTools::FileExists(path.c_str());
-    }
+      {
+      return !(path.find("CMakeTmp") == path.npos &&
+               cmSystemTools::FileExists(path.c_str()));
+      }
   };
 }
 
@@ -846,13 +847,22 @@ void cmMakefile::FinalPass()
 
   //remove_if will move all items that don't have a valid file name to the
   //back of the vector
-  std::vector<std::string>::iterator new_end = std::remove_if(
-                                                this->OutputFiles.begin(),
-                                                this->OutputFiles.end(),
-                                                file_exists() );
+  std::vector<std::string>::iterator new_output_files_end = std::remove_if(
+                                                     this->OutputFiles.begin(),
+                                                     this->OutputFiles.end(),
+                                                     file_not_persistent() );
   //we just have to erase all items at the back
-  this->OutputFiles.erase(new_end, this->OutputFiles.end() );
+  this->OutputFiles.erase(new_output_files_end, this->OutputFiles.end() );
+
+  //if a configured file is used as input for another configured file,
+  //and then deleted it will show up in the input list files so we
+  //need to scan those too
+  std::vector<std::string>::iterator new_list_files_end = std::remove_if(
+                                                   this->ListFiles.begin(),
+                                                   this->ListFiles.end(),
+                                                   file_not_persistent() );
 
+  this->ListFiles.erase(new_list_files_end, this->ListFiles.end() );
 }
 
 // Generate the output file

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list