[Cmake-commits] CMake branch, next, updated. v3.3.1-2346-gc750157

Stephen Kelly steveire at gmail.com
Sun Aug 23 12:08:35 EDT 2015


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  c7501577fbc81d257017a5edfe0520da67e226eb (commit)
       via  3fa1b9641dd16ad93c64737fd2eeb131cca70f76 (commit)
       via  55e3927634a4b071c1cf52cc2dc406b8973b82cc (commit)
       via  04168cbb593be0d58326b09346e90a6348a862ff (commit)
       via  2394584ce2fa4ff88bb8b196e5a75fc5f848ba4a (commit)
       via  b9eb3cd1405d423bf0156fabc3340c396b1f308c (commit)
       via  f5d2b7a6942ee291f8e0d4e8a7a7869037913de7 (commit)
      from  456ea8c2a62f646f3b0192273cb49d8462f8ce02 (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=c7501577fbc81d257017a5edfe0520da67e226eb
commit c7501577fbc81d257017a5edfe0520da67e226eb
Merge: 456ea8c 3fa1b96
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 23 12:08:34 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Aug 23 12:08:34 2015 -0400

    Merge topic 'refactor-progress' into next
    
    3fa1b964 cmGlobalUnixMakefileGenerator3: Change the progress container key.
    55e39276 cmState: Make it possible to order cmState::Snapshot.
    04168cbb cmGlobalUnixMakefileGenerator3: Rename member.
    2394584c cmGlobalGenerator: Rename progress initializer method.
    b9eb3cd1 cmGlobalGenerator: Move LG to target map to subclass.
    f5d2b7a6 cmGlobalGenerator: Remove clearance of map.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fa1b9641dd16ad93c64737fd2eeb131cca70f76
commit 3fa1b9641dd16ad93c64737fd2eeb131cca70f76
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:29:01 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 18:05:13 2015 +0200

    cmGlobalUnixMakefileGenerator3: Change the progress container key.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 75c2fb8..b240924 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -943,7 +943,7 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
         {
         // This local generator includes the target.
         std::set<cmGeneratorTarget const*>& targetSet =
-          this->DirectoryTargetsMap[clg];
+          this->DirectoryTargetsMap[clg->GetStateSnapshot()];
         targetSet.insert(gt);
 
         // Add dependencies of the included target.  An excluded
@@ -992,7 +992,7 @@ cmGlobalUnixMakefileGenerator3
   size_t count = 0;
   std::set<cmGeneratorTarget const*> emitted;
   std::set<cmGeneratorTarget const*> const& targets
-                                        = this->DirectoryTargetsMap[lg];
+      = this->DirectoryTargetsMap[lg->GetStateSnapshot()];
   for(std::set<cmGeneratorTarget const*>::const_iterator t = targets.begin();
       t != targets.end(); ++t)
     {
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 7601cc4..c738c16 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -207,8 +207,9 @@ private:
   virtual const char* GetBuildIgnoreErrorsFlag() const { return "-i"; }
   virtual std::string GetEditCacheCommand() const;
 
-  std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
-                                                    DirectoryTargetsMap;
+  std::map<cmState::Snapshot,
+           std::set<cmGeneratorTarget const*>,
+           cmState::Snapshot::StrictWeakOrder> DirectoryTargetsMap;
   virtual void InitializeProgressMarks();
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55e3927634a4b071c1cf52cc2dc406b8973b82cc
commit 55e3927634a4b071c1cf52cc2dc406b8973b82cc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:07:30 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 18:05:13 2015 +0200

    cmState: Make it possible to order cmState::Snapshot.

diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h
index 3bcb940..721a246 100644
--- a/Source/cmLinkedTree.h
+++ b/Source/cmLinkedTree.h
@@ -128,6 +128,13 @@ public:
         }
       return this->Position <= this->Tree->Data.size();
     }
+
+    bool StrictWeakOrdered(iterator other) const
+    {
+      assert(this->Tree);
+      assert(this->Tree == other.Tree);
+      return this->Position < other.Position;
+    }
   };
 
   iterator Root() const
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index f425861..66f19c3 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -1411,3 +1411,9 @@ void cmState::Directory::ClearCompileOptions()
                this->DirectoryState->CompileOptionsBacktraces,
                this->Snapshot_.Position->CompileOptionsPosition);
 }
+
+bool cmState::Snapshot::StrictWeakOrder::operator()(
+    const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) const
+{
+  return lhs.Position.StrictWeakOrdered(rhs.Position);
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index 07aa2a5..3132d1b 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -74,9 +74,16 @@ public:
 
     Directory GetDirectory() const;
 
+    struct StrictWeakOrder
+    {
+      bool operator()(const cmState::Snapshot& lhs,
+                      const cmState::Snapshot& rhs) const;
+    };
+
   private:
     friend class cmState;
     friend class Directory;
+    friend struct StrictWeakOrder;
     cmState* State;
     cmState::PositionType Position;
   };

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=04168cbb593be0d58326b09346e90a6348a862ff
commit 04168cbb593be0d58326b09346e90a6348a862ff
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 23 17:52:30 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 18:05:13 2015 +0200

    cmGlobalUnixMakefileGenerator3: Rename member.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index f8dee62..75c2fb8 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -921,7 +921,7 @@ cmGlobalUnixMakefileGenerator3
 // generator directory level.
 void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
 {
-  this->LocalGeneratorToTargetMap.clear();
+  this->DirectoryTargetsMap.clear();
   // Loop over all targets in all local generators.
   for(std::vector<cmLocalGenerator*>::const_iterator
         lgi = this->LocalGenerators.begin();
@@ -943,7 +943,7 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
         {
         // This local generator includes the target.
         std::set<cmGeneratorTarget const*>& targetSet =
-          this->LocalGeneratorToTargetMap[clg];
+          this->DirectoryTargetsMap[clg];
         targetSet.insert(gt);
 
         // Add dependencies of the included target.  An excluded
@@ -992,7 +992,7 @@ cmGlobalUnixMakefileGenerator3
   size_t count = 0;
   std::set<cmGeneratorTarget const*> emitted;
   std::set<cmGeneratorTarget const*> const& targets
-                                        = this->LocalGeneratorToTargetMap[lg];
+                                        = this->DirectoryTargetsMap[lg];
   for(std::set<cmGeneratorTarget const*>::const_iterator t = targets.begin();
       t != targets.end(); ++t)
     {
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index a8f99dd..7601cc4 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -208,7 +208,7 @@ private:
   virtual std::string GetEditCacheCommand() const;
 
   std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
-                                                    LocalGeneratorToTargetMap;
+                                                    DirectoryTargetsMap;
   virtual void InitializeProgressMarks();
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2394584ce2fa4ff88bb8b196e5a75fc5f848ba4a
commit 2394584ce2fa4ff88bb8b196e5a75fc5f848ba4a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:23:12 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 18:05:13 2015 +0200

    cmGlobalGenerator: Rename progress initializer method.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 2dddc7d..503c455 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1340,7 +1340,7 @@ void cmGlobalGenerator::Generate()
 
   // Create a map from local generator to the complete set of targets
   // it builds by default.
-  this->FillLocalGeneratorToTargetMap();
+  this->InitializeProgressMarks();
 
   for (i = 0; i < this->LocalGenerators.size(); ++i)
     {
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 86f52af..fe710f1 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -398,7 +398,7 @@ protected:
   void CheckLocalGenerators();
   bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
   bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
-  virtual void FillLocalGeneratorToTargetMap() {}
+  virtual void InitializeProgressMarks() {}
   void CreateDefaultGlobalTargets(cmTargets* targets);
   cmTarget CreateGlobalTarget(const std::string& name, const char* message,
     const cmCustomCommandLines* commandLines,
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 255b59d..f8dee62 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -919,7 +919,7 @@ cmGlobalUnixMakefileGenerator3
 
 // Build a map that contains a the set of targets used by each local
 // generator directory level.
-void cmGlobalUnixMakefileGenerator3::FillLocalGeneratorToTargetMap()
+void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
 {
   this->LocalGeneratorToTargetMap.clear();
   // Loop over all targets in all local generators.
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index de7d858..a8f99dd 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -209,7 +209,7 @@ private:
 
   std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
                                                     LocalGeneratorToTargetMap;
-  virtual void FillLocalGeneratorToTargetMap();
+  virtual void InitializeProgressMarks();
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9eb3cd1405d423bf0156fabc3340c396b1f308c
commit b9eb3cd1405d423bf0156fabc3340c396b1f308c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:22:12 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 18:05:01 2015 +0200

    cmGlobalGenerator: Move LG to target map to subclass.
    
    This is the only user.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 621f1d4..2dddc7d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2117,50 +2117,6 @@ void cmGlobalGenerator::FillProjectMap()
     }
 }
 
-
-// Build a map that contains a the set of targets used by each local
-// generator directory level.
-void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
-{
-  this->LocalGeneratorToTargetMap.clear();
-  // Loop over all targets in all local generators.
-  for(std::vector<cmLocalGenerator*>::const_iterator
-        lgi = this->LocalGenerators.begin();
-      lgi != this->LocalGenerators.end(); ++lgi)
-    {
-    cmLocalGenerator* lg = *lgi;
-    cmMakefile* mf = lg->GetMakefile();
-    cmTargets const& targets = mf->GetTargets();
-    for(cmTargets::const_iterator t = targets.begin(); t != targets.end(); ++t)
-      {
-      cmTarget const& target = t->second;
-
-      cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
-
-      // Consider the directory containing the target and all its
-      // parents until something excludes the target.
-      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt);
-          clg = clg->GetParent())
-        {
-        // This local generator includes the target.
-        std::set<cmGeneratorTarget const*>& targetSet =
-          this->LocalGeneratorToTargetMap[clg];
-        targetSet.insert(gt);
-
-        // Add dependencies of the included target.  An excluded
-        // target may still be included if it is a dependency of a
-        // non-excluded target.
-        TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(gt);
-        for(TargetDependSet::const_iterator ti = tgtdeps.begin();
-            ti != tgtdeps.end(); ++ti)
-          {
-          targetSet.insert(*ti);
-          }
-        }
-      }
-    }
-}
-
 cmMakefile*
 cmGlobalGenerator::FindMakefile(const std::string& start_dir) const
 {
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index a13bede..86f52af 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -398,7 +398,7 @@ protected:
   void CheckLocalGenerators();
   bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
   bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
-  void FillLocalGeneratorToTargetMap();
+  virtual void FillLocalGeneratorToTargetMap() {}
   void CreateDefaultGlobalTargets(cmTargets* targets);
   cmTarget CreateGlobalTarget(const std::string& name, const char* message,
     const cmCustomCommandLines* commandLines,
@@ -413,8 +413,6 @@ protected:
   cmMakefile* CurrentMakefile;
   // map from project name to vector of local generators in that project
   std::map<std::string, std::vector<cmLocalGenerator*> > ProjectMap;
-  std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
-                                                    LocalGeneratorToTargetMap;
 
   // Set of named installation components requested by the project.
   std::set<std::string> InstallComponents;
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 76d059ee..255b59d 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -917,6 +917,49 @@ cmGlobalUnixMakefileGenerator3
     }
 }
 
+// Build a map that contains a the set of targets used by each local
+// generator directory level.
+void cmGlobalUnixMakefileGenerator3::FillLocalGeneratorToTargetMap()
+{
+  this->LocalGeneratorToTargetMap.clear();
+  // Loop over all targets in all local generators.
+  for(std::vector<cmLocalGenerator*>::const_iterator
+        lgi = this->LocalGenerators.begin();
+      lgi != this->LocalGenerators.end(); ++lgi)
+    {
+    cmLocalGenerator* lg = *lgi;
+    cmMakefile* mf = lg->GetMakefile();
+    cmTargets const& targets = mf->GetTargets();
+    for(cmTargets::const_iterator t = targets.begin(); t != targets.end(); ++t)
+      {
+      cmTarget const& target = t->second;
+
+      cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
+
+      // Consider the directory containing the target and all its
+      // parents until something excludes the target.
+      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt);
+          clg = clg->GetParent())
+        {
+        // This local generator includes the target.
+        std::set<cmGeneratorTarget const*>& targetSet =
+          this->LocalGeneratorToTargetMap[clg];
+        targetSet.insert(gt);
+
+        // Add dependencies of the included target.  An excluded
+        // target may still be included if it is a dependency of a
+        // non-excluded target.
+        TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(gt);
+        for(TargetDependSet::const_iterator ti = tgtdeps.begin();
+            ti != tgtdeps.end(); ++ti)
+          {
+          targetSet.insert(*ti);
+          }
+        }
+      }
+    }
+}
+
 //----------------------------------------------------------------------------
 size_t
 cmGlobalUnixMakefileGenerator3
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index fc53fa8..de7d858 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -206,6 +206,10 @@ protected:
 private:
   virtual const char* GetBuildIgnoreErrorsFlag() const { return "-i"; }
   virtual std::string GetEditCacheCommand() const;
+
+  std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
+                                                    LocalGeneratorToTargetMap;
+  virtual void FillLocalGeneratorToTargetMap();
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5d2b7a6942ee291f8e0d4e8a7a7869037913de7
commit f5d2b7a6942ee291f8e0d4e8a7a7869037913de7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:20:11 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 17:49:11 2015 +0200

    cmGlobalGenerator: Remove clearance of map.
    
    It is always cleared before being re-populated.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cda26cd..621f1d4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1610,7 +1610,6 @@ void cmGlobalGenerator::ClearGeneratorMembers()
   this->TargetDependencies.clear();
   this->TotalTargets.clear();
   this->ImportedTargets.clear();
-  this->LocalGeneratorToTargetMap.clear();
   this->ProjectMap.clear();
   this->RuleHashes.clear();
   this->DirectoryContentMap.clear();

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

Summary of changes:
 Source/cmGlobalGenerator.cxx              |   47 +----------------------------
 Source/cmGlobalGenerator.h                |    4 +--
 Source/cmGlobalUnixMakefileGenerator3.cxx |   45 ++++++++++++++++++++++++++-
 Source/cmGlobalUnixMakefileGenerator3.h   |    5 +++
 Source/cmLinkedTree.h                     |    7 +++++
 Source/cmState.cxx                        |    6 ++++
 Source/cmState.h                          |    7 +++++
 7 files changed, 71 insertions(+), 50 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list