[Cmake-commits] CMake branch, next, updated. v3.2.3-1423-ga2556fe

Stephen Kelly steveire at gmail.com
Tue Jun 2 19:18: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  a2556feeb11dc3b758898bdc8ccd44a063401f7d (commit)
       via  cf1233a0eab7cec757d2929cc7373f94ba4fa8a8 (commit)
       via  942df88bf83e99abbfbd69207369096fa7cf67a2 (commit)
       via  da28f11523644cdc2138a0cde2c4c015948ff46c (commit)
      from  02493a5a171bfc1077703982a3bafc3e2b493ecf (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=a2556feeb11dc3b758898bdc8ccd44a063401f7d
commit a2556feeb11dc3b758898bdc8ccd44a063401f7d
Merge: 02493a5 cf1233a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 2 19:18:14 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 2 19:18:14 2015 -0400

    Merge topic 'rename-cmState-API' into next
    
    cf1233a0 cmState: Rename GetParent method.
    942df88b cmState: Rename CreateSnapshot method.
    da28f115 cmState: Add CreateBaseSnapshot method.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf1233a0eab7cec757d2929cc7373f94ba4fa8a8
commit cf1233a0eab7cec757d2929cc7373f94ba4fa8a8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 23 08:02:54 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:15:03 2015 +0200

    cmState: Rename GetParent method.
    
    Leave the namespace open for other Parent types.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index eb6b871..a16fc55 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -73,7 +73,7 @@ cmLocalGenerator::~cmLocalGenerator()
 
 bool cmLocalGenerator::IsRootMakefile() const
 {
-  return !this->StateSnapshot.GetParent().IsValid();
+  return !this->StateSnapshot.GetBuildsystemDirectoryParent().IsValid();
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 60498ef..00627bf 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4038,7 +4038,8 @@ const char *cmMakefile::GetProperty(const std::string& prop,
   output = "";
   if (prop == "PARENT_DIRECTORY")
     {
-    cmState::Snapshot parent = this->StateSnapshot.GetParent();
+    cmState::Snapshot parent =
+        this->StateSnapshot.GetBuildsystemDirectoryParent();
     if(parent.IsValid())
       {
       return parent.GetCurrentSourceDirectory();
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 87892b4..c6fb299 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -590,7 +590,7 @@ void cmState::Snapshot::ComputeRelativePathTopSource()
   snapshots.push_back(snapshot);
   while (true)
     {
-    snapshot = snapshot.GetParent();
+    snapshot = snapshot.GetBuildsystemDirectoryParent();
     if (snapshot.IsValid())
       {
       snapshots.push_back(snapshot);
@@ -622,7 +622,7 @@ void cmState::Snapshot::ComputeRelativePathTopBinary()
   snapshots.push_back(snapshot);
   while (true)
     {
-    snapshot = snapshot.GetParent();
+    snapshot = snapshot.GetBuildsystemDirectoryParent();
     if (snapshot.IsValid())
       {
       snapshots.push_back(snapshot);
@@ -775,7 +775,7 @@ bool cmState::Snapshot::IsValid() const
   return this->State ? true : false;
 }
 
-cmState::Snapshot cmState::Snapshot::GetParent() const
+cmState::Snapshot cmState::Snapshot::GetBuildsystemDirectoryParent() const
 {
   Snapshot snapshot;
   if (!this->State || this->Position == 0)
diff --git a/Source/cmState.h b/Source/cmState.h
index 24e0f7b..60b024f 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -45,7 +45,7 @@ public:
     void SetRelativePathTopBinary(const char* dir);
 
     bool IsValid() const;
-    Snapshot GetParent() const;
+    Snapshot GetBuildsystemDirectoryParent() const;
 
   private:
     void ComputeRelativePathTopSource();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=942df88bf83e99abbfbd69207369096fa7cf67a2
commit 942df88bf83e99abbfbd69207369096fa7cf67a2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 23 08:00:46 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:14:34 2015 +0200

    cmState: Rename CreateSnapshot method.
    
    Leave the namespace open for other snapshot types.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7c74a0f..60498ef 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1619,7 +1619,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
     }
 
   cmState::Snapshot newSnapshot = this->GetState()
-      ->CreateSnapshot(this->StateSnapshot);
+      ->CreateBuildsystemDirectorySnapshot(this->StateSnapshot);
 
   // create a new local generator and set its parent
   cmLocalGenerator *lg2 = this->GetGlobalGenerator()
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index eade817..87892b4 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -672,7 +672,8 @@ cmState::Snapshot cmState::CreateBaseSnapshot()
   return cmState::Snapshot(this, pos);
 }
 
-cmState::Snapshot cmState::CreateSnapshot(Snapshot originSnapshot)
+cmState::Snapshot
+cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot)
 {
   assert(originSnapshot.IsValid());
   PositionType pos = this->ParentPositions.size();
diff --git a/Source/cmState.h b/Source/cmState.h
index 157bd90..24e0f7b 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -58,7 +58,7 @@ public:
   };
 
   Snapshot CreateBaseSnapshot();
-  Snapshot CreateSnapshot(Snapshot originSnapshot);
+  Snapshot CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot);
 
   enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC,
                        UNINITIALIZED };

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da28f11523644cdc2138a0cde2c4c015948ff46c
commit da28f11523644cdc2138a0cde2c4c015948ff46c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 31 00:18:33 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:14:33 2015 +0200

    cmState: Add CreateBaseSnapshot method.

diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 58885d3..eade817 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -659,12 +659,22 @@ void cmState::Snapshot::ComputeRelativePathTopBinary()
     }
 }
 
+cmState::Snapshot cmState::CreateBaseSnapshot()
+{
+  PositionType pos = 0;
+  this->ParentPositions.push_back(pos);
+  this->Locations.resize(1);
+  this->OutputLocations.resize(1);
+  this->CurrentSourceDirectoryComponents.resize(1);
+  this->CurrentBinaryDirectoryComponents.resize(1);
+  this->RelativePathTopSource.resize(1);
+  this->RelativePathTopBinary.resize(1);
+  return cmState::Snapshot(this, pos);
+}
+
 cmState::Snapshot cmState::CreateSnapshot(Snapshot originSnapshot)
 {
-  if (!originSnapshot.IsValid())
-    {
-    originSnapshot.State = this;
-    }
+  assert(originSnapshot.IsValid());
   PositionType pos = this->ParentPositions.size();
   this->ParentPositions.push_back(originSnapshot.Position);
   this->Locations.resize(this->Locations.size() + 1);
diff --git a/Source/cmState.h b/Source/cmState.h
index 77a066f..157bd90 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -57,6 +57,7 @@ public:
     cmState::PositionType Position;
   };
 
+  Snapshot CreateBaseSnapshot();
   Snapshot CreateSnapshot(Snapshot originSnapshot);
 
   enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC,
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 23803ef..ee5d53c 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -134,7 +134,7 @@ cmake::cmake()
 
   this->Policies = new cmPolicies();
   this->State = new cmState(this);
-  this->CurrentSnapshot = this->State->CreateSnapshot(cmState::Snapshot());
+  this->CurrentSnapshot = this->State->CreateBaseSnapshot();
 
 #ifdef __APPLE__
   struct rlimit rlp;

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

Summary of changes:
 Source/cmLocalGenerator.cxx |    2 +-
 Source/cmMakefile.cxx       |    5 +++--
 Source/cmState.cxx          |   27 +++++++++++++++++++--------
 Source/cmState.h            |    5 +++--
 Source/cmake.cxx            |    2 +-
 5 files changed, 27 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list