[Cmake-commits] CMake branch, next, updated. v3.3.1-2390-g4c849ca

Stephen Kelly steveire at gmail.com
Mon Aug 24 14:04:14 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  4c849cab1b87c33f6ae57962dc2150a8c61b7d39 (commit)
       via  7fbc56ac400fe7aaafaa581bca2f2848287ce7fd (commit)
       via  65c434e1b0247a47df763a616d1c8fdb20daba5c (commit)
       via  be56feb6184e80eab5ce93b5ab81308452a5559f (commit)
       via  45f52003962f2f5ae58be2dd779f441bb4ca01f7 (commit)
       via  af9fc277536f37980ccdab699a934b3c42e9fba9 (commit)
       via  9b44018d520cfabc347d6d79cafdf0a37c62b4e0 (commit)
       via  5f05b56284f9a76aa90562186aebd383a3ca9349 (commit)
       via  95925a60fce8a7b60fbea9873d9bb9fadf47cd02 (commit)
      from  34aeda59a141683d6b8ff5dbbce4a6a3f9ca724b (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=4c849cab1b87c33f6ae57962dc2150a8c61b7d39
commit 4c849cab1b87c33f6ae57962dc2150a8c61b7d39
Merge: 34aeda5 7fbc56a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Aug 24 14:04:13 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Aug 24 14:04:13 2015 -0400

    Merge topic 'refactor-progress' into next
    
    7fbc56ac cmGlobalUnixMakefileGenerator3: Implement progress in terms of cmState.
    65c434e1 cmGlobalUnixMakefileGenerator3: Inline an IsExcluded call.
    be56feb6 cmGlobalGenerator: Extract new IsExcluded overload.
    45f52003 cmGlobalGenerator: Implement IsExcluded in terms of cmState::Snapshot.
    af9fc277 cmState: Make Snapshot EqualityComparable.
    9b44018d cmGlobalGenerator: Convert IsExcluded to loop.
    5f05b562 cmGlobalGenerator: Refactor IsExcluded.
    95925a60 cmGlobalGenerator: Don't use else after return.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7fbc56ac400fe7aaafaa581bca2f2848287ce7fd
commit 7fbc56ac400fe7aaafaa581bca2f2848287ce7fd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:41:55 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:30 2015 +0200

    cmGlobalUnixMakefileGenerator3: Implement progress in terms of cmState.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 6a13977..8c8c56e 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -944,14 +944,17 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
         continue;
         }
 
+      cmState::Snapshot csnp = lg->GetStateSnapshot();
+      cmState::Snapshot tsnp = tlg->GetStateSnapshot();
+
       // Consider the directory containing the target and all its
       // parents until something excludes the target.
-      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, tlg);
-          clg = clg->GetParent())
+      for( ; csnp.IsValid() && !this->IsExcluded(csnp, tsnp);
+          csnp = csnp.GetBuildsystemDirectoryParent())
         {
         // This local generator includes the target.
         std::set<cmGeneratorTarget const*>& targetSet =
-          this->DirectoryTargetsMap[clg->GetStateSnapshot()];
+          this->DirectoryTargetsMap[csnp];
         targetSet.insert(gt);
 
         // Add dependencies of the included target.  An excluded

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65c434e1b0247a47df763a616d1c8fdb20daba5c
commit 65c434e1b0247a47df763a616d1c8fdb20daba5c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:39:19 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:29 2015 +0200

    cmGlobalUnixMakefileGenerator3: Inline an IsExcluded call.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index b240924..6a13977 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -936,9 +936,17 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
 
       cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
 
+      cmLocalGenerator* tlg = gt->GetLocalGenerator();
+
+      if(gt->GetType() == cmTarget::INTERFACE_LIBRARY
+          || gt->Target->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
+        {
+        continue;
+        }
+
       // Consider the directory containing the target and all its
       // parents until something excludes the target.
-      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt);
+      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, tlg);
           clg = clg->GetParent())
         {
         // This local generator includes the target.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be56feb6184e80eab5ce93b5ab81308452a5559f
commit be56feb6184e80eab5ce93b5ab81308452a5559f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:58:57 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:29 2015 +0200

    cmGlobalGenerator: Extract new IsExcluded overload.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index d7aca47..be7896d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2041,13 +2041,10 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen)
     }
 }
 
-bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
-                                   cmLocalGenerator* gen) const
+bool cmGlobalGenerator::IsExcluded(cmState::Snapshot const& rootSnp,
+                       cmState::Snapshot const& snp_) const
 {
-  assert(gen);
-
-  cmState::Snapshot rootSnp = root->GetStateSnapshot();
-  cmState::Snapshot snp = gen->GetStateSnapshot();
+  cmState::Snapshot snp = snp_;
   while (snp.IsValid())
     {
     if(snp == rootSnp)
@@ -2067,6 +2064,17 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
 }
 
 bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
+                                   cmLocalGenerator* gen) const
+{
+  assert(gen);
+
+  cmState::Snapshot rootSnp = root->GetStateSnapshot();
+  cmState::Snapshot snp = gen->GetStateSnapshot();
+
+  return this->IsExcluded(rootSnp, snp);
+}
+
+bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
                                    cmGeneratorTarget* target) const
 {
   if(target->GetType() == cmTarget::INTERFACE_LIBRARY
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index fe710f1..23501bc 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -396,6 +396,8 @@ protected:
   // has been populated.
   void FillProjectMap();
   void CheckLocalGenerators();
+  bool IsExcluded(cmState::Snapshot const& root,
+                  cmState::Snapshot const& snp) const;
   bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
   bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
   virtual void InitializeProgressMarks() {}

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45f52003962f2f5ae58be2dd779f441bb4ca01f7
commit 45f52003962f2f5ae58be2dd779f441bb4ca01f7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:57:25 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:29 2015 +0200

    cmGlobalGenerator: Implement IsExcluded in terms of cmState::Snapshot.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index b7b4fba..d7aca47 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2046,21 +2046,22 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
 {
   assert(gen);
 
-  cmLocalGenerator* lg = gen;
-  while (lg)
+  cmState::Snapshot rootSnp = root->GetStateSnapshot();
+  cmState::Snapshot snp = gen->GetStateSnapshot();
+  while (snp.IsValid())
     {
-    if(lg == root)
+    if(snp == rootSnp)
       {
       // No directory excludes itself.
       return false;
       }
 
-    if(lg->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
+    if(snp.GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL"))
       {
       // This directory is excluded from its parent.
       return true;
       }
-    lg = lg->GetParent();
+    snp = snp.GetBuildsystemDirectoryParent();
     }
   return false;
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af9fc277536f37980ccdab699a934b3c42e9fba9
commit af9fc277536f37980ccdab699a934b3c42e9fba9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:56:08 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:29 2015 +0200

    cmState: Make Snapshot EqualityComparable.

diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 53fdae0..4e4c2c6 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -1701,3 +1701,13 @@ std::vector<std::string> cmState::Directory::GetPropertyKeys() const
     }
   return keys;
 }
+
+bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs)
+{
+  return lhs.Position == rhs.Position;
+}
+
+bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs)
+{
+  return lhs.Position != rhs.Position;
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index e503cd2..d683068 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -93,6 +93,10 @@ public:
     };
 
   private:
+    friend bool operator==(const cmState::Snapshot& lhs,
+                           const cmState::Snapshot& rhs);
+    friend bool operator!=(const cmState::Snapshot& lhs,
+                           const cmState::Snapshot& rhs);
     friend class cmState;
     friend class Directory;
     friend struct StrictWeakOrder;
@@ -314,4 +318,7 @@ private:
   bool MSYSShell;
 };
 
+bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs);
+bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs);
+
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b44018d520cfabc347d6d79cafdf0a37c62b4e0
commit 9b44018d520cfabc347d6d79cafdf0a37c62b4e0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:54:22 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:29 2015 +0200

    cmGlobalGenerator: Convert IsExcluded to loop.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a610b3d..b7b4fba 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2046,27 +2046,23 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
 {
   assert(gen);
 
-  if(gen == root)
+  cmLocalGenerator* lg = gen;
+  while (lg)
     {
-    // No directory excludes itself.
-    return false;
-    }
-
-  if(gen->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
-    {
-    // This directory is excluded from its parent.
-    return true;
-    }
+    if(lg == root)
+      {
+      // No directory excludes itself.
+      return false;
+      }
 
-  cmLocalGenerator* lg = gen->GetParent();
-  if (!lg)
-    {
-    return false;
+    if(lg->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
+      {
+      // This directory is excluded from its parent.
+      return true;
+      }
+    lg = lg->GetParent();
     }
-
-  // This directory is included in its parent.  Check whether the
-  // parent is excluded.
-  return this->IsExcluded(root, lg);
+  return false;
 }
 
 bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f05b56284f9a76aa90562186aebd383a3ca9349
commit 5f05b56284f9a76aa90562186aebd383a3ca9349
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:51:56 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:29 2015 +0200

    cmGlobalGenerator: Refactor IsExcluded.
    
    Make it easier to convert it to a loop.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 71b00c4..a610b3d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2044,7 +2044,9 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen)
 bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
                                    cmLocalGenerator* gen) const
 {
-  if(!gen || gen == root)
+  assert(gen);
+
+  if(gen == root)
     {
     // No directory excludes itself.
     return false;
@@ -2056,9 +2058,15 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
     return true;
     }
 
+  cmLocalGenerator* lg = gen->GetParent();
+  if (!lg)
+    {
+    return false;
+    }
+
   // This directory is included in its parent.  Check whether the
   // parent is excluded.
-  return this->IsExcluded(root, gen->GetParent());
+  return this->IsExcluded(root, lg);
 }
 
 bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95925a60fce8a7b60fbea9873d9bb9fadf47cd02
commit 95925a60fce8a7b60fbea9873d9bb9fadf47cd02
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:34:29 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:03:29 2015 +0200

    cmGlobalGenerator: Don't use else after return.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 503c455..71b00c4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2070,12 +2070,9 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
     // This target is excluded from its directory.
     return true;
     }
-  else
-    {
-    // This target is included in its directory.  Check whether the
-    // directory is excluded.
-    return this->IsExcluded(root, target->GetLocalGenerator());
-    }
+  // This target is included in its directory.  Check whether the
+  // directory is excluded.
+  return this->IsExcluded(root, target->GetLocalGenerator());
 }
 
 void

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

Summary of changes:
 Source/cmGlobalGenerator.cxx              |   48 +++++++++++++++++------------
 Source/cmGlobalGenerator.h                |    2 ++
 Source/cmGlobalUnixMakefileGenerator3.cxx |   17 ++++++++--
 Source/cmState.cxx                        |   10 ++++++
 Source/cmState.h                          |    7 +++++
 5 files changed, 62 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list