[Cmake-commits] CMake branch, next, updated. v3.2.2-2369-g4445ea0

Stephen Kelly steveire at gmail.com
Thu Apr 30 17:52:54 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  4445ea0056c4adf2025fd653235c0244250a09c6 (commit)
       via  e8ae46e5e228cc3008e64766e6c8da48b1835545 (commit)
       via  30a021cc224d420725bd7e88277cc3cca7c67ae4 (commit)
      from  6db363e888e2ed8de6fad8b58655b409167cdbfb (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=4445ea0056c4adf2025fd653235c0244250a09c6
commit 4445ea0056c4adf2025fd653235c0244250a09c6
Merge: 6db363e e8ae46e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Apr 30 17:52:48 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 30 17:52:48 2015 -0400

    Merge topic 'refactor-RaiseScope' into next
    
    e8ae46e5 cmMakefile: Implement RaiseScope without relying on Parent.
    30a021cc cmMakefile: Implement RaiseScope in terms of local Get method.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8ae46e5e228cc3008e64766e6c8da48b1835545
commit e8ae46e5e228cc3008e64766e6c8da48b1835545
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Apr 30 00:19:55 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Apr 30 23:45:06 2015 +0200

    cmMakefile: Implement RaiseScope without relying on Parent.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4bbd5f1..5686b1b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -117,34 +117,38 @@ public:
 
   bool RaiseScope(std::string const& var, const char* varDef, cmMakefile* mf)
   {
-    cmDefinitions& cur = this->VarStack.back();
-    if(cmDefinitions* up = cur.GetParent())
-      {
-      // First localize the definition in the current scope.
-      this->GetDefinition(var);
+    assert(this->VarStack.size() > 0);
 
-      // Now update the definition in the parent scope.
-      up->Set(var, varDef);
-      }
-    else if(cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent())
+    std::list<cmDefinitions>::reverse_iterator it = this->VarStack.rbegin();
+    ++it;
+    if(it == this->VarStack.rend())
       {
-      // Update the definition in the parent directory top scope.  This
-      // directory's scope was initialized by the closure of the parent
-      // scope, so we do not need to localize the definition first.
-      cmMakefile* parent = plg->GetMakefile();
-      if (varDef)
+      if(cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent())
         {
-        parent->AddDefinition(var, varDef);
+        // Update the definition in the parent directory top scope.  This
+        // directory's scope was initialized by the closure of the parent
+        // scope, so we do not need to localize the definition first.
+        cmMakefile* parent = plg->GetMakefile();
+        if (varDef)
+          {
+          parent->AddDefinition(var, varDef);
+          }
+        else
+          {
+          parent->RemoveDefinition(var);
+          }
+        return true;
         }
       else
         {
-        parent->RemoveDefinition(var);
+        return false;
         }
       }
-    else
-      {
-      return false;
-      }
+    // First localize the definition in the current scope.
+    this->GetDefinition(var);
+
+    // Now update the definition in the parent scope.
+    it->Set(var, varDef);
     return true;
   }
 };

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30a021cc224d420725bd7e88277cc3cca7c67ae4
commit 30a021cc224d420725bd7e88277cc3cca7c67ae4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Apr 26 16:22:52 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Apr 30 23:34:01 2015 +0200

    cmMakefile: Implement RaiseScope in terms of local Get method.
    
    The cmDefinitions::Get will change behavior in follow up commits.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index bd42f4e..4bbd5f1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -121,7 +121,7 @@ public:
     if(cmDefinitions* up = cur.GetParent())
       {
       // First localize the definition in the current scope.
-      cur.Get(var);
+      this->GetDefinition(var);
 
       // Now update the definition in the parent scope.
       up->Set(var, varDef);

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

Summary of changes:
 Source/cmMakefile.cxx |   44 ++++++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list