summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-11 16:38:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-28 05:57:01 (GMT)
commit3a041c59495df26c2b7b0ee58069d27a03bd18ff (patch)
treed4611c6883b5b05dbc2fd9b0739497ddb30e4b98 /Source/cmState.cxx
parentae6c8a9d68120229a2960a83b51241fdb926700a (diff)
downloadCMake-3a041c59495df26c2b7b0ee58069d27a03bd18ff.zip
CMake-3a041c59495df26c2b7b0ee58069d27a03bd18ff.tar.gz
CMake-3a041c59495df26c2b7b0ee58069d27a03bd18ff.tar.bz2
Introduce cmState::Snapshot.
Create snapshots for buildsystem directories during configure time. This class will be extended in follow up commits to snapshot all values in the cmState.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 6fbbc4b..610257e 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -22,6 +22,7 @@ cmState::cmState(cmake* cm)
: CMakeInstance(cm),
IsInTryCompile(false)
{
+ this->CreateSnapshot(Snapshot());
this->Initialize();
}
@@ -466,3 +467,17 @@ const char* cmState::GetBinaryDirectory() const
{
return this->BinaryDirectory.c_str();
}
+
+cmState::Snapshot cmState::CreateSnapshot(Snapshot originSnapshot)
+{
+ PositionType pos = this->ParentPositions.size();
+ this->ParentPositions.push_back(originSnapshot.Position);
+ return cmState::Snapshot(this, pos);
+}
+
+cmState::Snapshot::Snapshot(cmState* state, PositionType position)
+ : State(state),
+ Position(position)
+{
+
+}