[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3290-g14d87c2

Robert Maynard robert.maynard at kitware.com
Mon Jul 22 11:15:32 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  14d87c255ff602bc4597aa687be09fb160f29b89 (commit)
       via  a11da72e7b465933eb4e92eee5db8e6d334e843b (commit)
      from  f399040862e426b4cb33e586a987b7f63550470e (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=14d87c255ff602bc4597aa687be09fb160f29b89
commit 14d87c255ff602bc4597aa687be09fb160f29b89
Merge: f399040 a11da72
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Jul 22 11:15:30 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 22 11:15:30 2013 -0400

    Merge topic 'windows_ninja_duplicate_paths' into next
    
    a11da72 Ninja: Properly convert all paths to unix style before we do set intersection.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a11da72e7b465933eb4e92eee5db8e6d334e843b
commit a11da72e7b465933eb4e92eee5db8e6d334e843b
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Jul 22 10:32:06 2013 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Jul 22 10:42:37 2013 -0400

    Ninja: Properly convert all paths to unix style before we do set intersection.
    
    On windows we had a subset of the paths as unix style and a subset as windows
    so when doing the set intersection it resulted in the same file being
    found twice.

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 9596ebc..578cb37 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -147,7 +147,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
     //we need to track every dependency that comes in, since we are trying
     //to find dependencies that are side effects of build commands
     //
-    this->CombinedBuildExplicitDependencies.insert(*i);
+    this->CombinedBuildExplicitDependencies.insert( EncodePath(*i) );
     }
 
   // Write implicit dependencies.
@@ -180,7 +180,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
       i != outputs.end(); ++i)
     {
     build << " " << EncodeIdent(EncodePath(*i), os);
-    this->CombinedBuildOutputs.insert(*i);
+    this->CombinedBuildOutputs.insert( EncodePath(*i) );
     }
   build << ":";
 
@@ -944,7 +944,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
     typedef std::vector<std::string>::const_iterator vect_it;
     for(vect_it j = files.begin(); j != files.end(); ++j)
       {
-      knownDependencies.insert(ng->ConvertToNinjaPath( j->c_str() ));
+      knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
       }
     }
 
@@ -959,26 +959,15 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
     typedef std::vector<std::string>::const_iterator vect_it;
     for(vect_it j = files.begin(); j != files.end(); ++j)
       {
-      knownDependencies.insert(ng->ConvertToNinjaPath( j->c_str() ));
+      knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
       }
     }
 
-  //insert outputs from all WirteBuild commands
-  for(std::set<std::string>::iterator i = this->CombinedBuildOutputs.begin();
-      i != this->CombinedBuildOutputs.end(); ++i)
-    {
-    knownDependencies.insert(*i);
-    }
-
-  //after we have combined the data into knownDependencies we have no need
-  //to keep this data around
-  this->CombinedBuildOutputs.clear();
-
   for(TargetAliasMap::const_iterator i= this->TargetAliases.begin();
       i != this->TargetAliases.end();
       ++i)
     {
-    knownDependencies.insert(i->first);
+    knownDependencies.insert( ng->ConvertToNinjaPath(i->first.c_str()) );
     }
 
   //remove all source files we know will exist.
@@ -987,11 +976,26 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
       i != this->AssumedSourceDependencies.end();
       ++i)
     {
-    knownDependencies.insert(i->first);
+    knownDependencies.insert( ng->ConvertToNinjaPath(i->first.c_str()) );
     }
 
+  //insert outputs from all WirteBuild commands
+  for(std::set<std::string>::iterator i = this->CombinedBuildOutputs.begin();
+      i != this->CombinedBuildOutputs.end(); ++i)
+    {
+    //these paths have already be encoded when added to CombinedBuildOutputs
+    knownDependencies.insert(*i);
+    }
+
+  //after we have combined the data into knownDependencies we have no need
+  //to keep this data around
+  this->CombinedBuildOutputs.clear();
+
   //now we difference with CombinedBuildExplicitDependencies to find
-  //the list of items we know nothing about
+  //the list of items we know nothing about.
+  //We have encoded all the paths in CombinedBuildExplicitDependencies
+  //and knownDependencies so no matter if unix or windows paths they
+  //should all match now.
 
   std::vector<std::string> unkownExplicitDepends;
   this->CombinedBuildExplicitDependencies.erase("all");

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

Summary of changes:
 Source/cmGlobalNinjaGenerator.cxx |   40 ++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list