summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-19 14:26:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-24 18:05:37 (GMT)
commitae026f5458c5c919031a41310321ae26cd56fae0 (patch)
treea72fa236bccdbfd231659a1c5e868068f899defa /Source/cmState.cxx
parentf4150bd88d80f4a236ea5b0d648d8cc3122092fc (diff)
downloadCMake-ae026f5458c5c919031a41310321ae26cd56fae0.zip
CMake-ae026f5458c5c919031a41310321ae26cd56fae0.tar.gz
CMake-ae026f5458c5c919031a41310321ae26cd56fae0.tar.bz2
cmState: Store Children states in parent state.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 53fdae0..3df855a 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -76,6 +76,8 @@ struct cmState::BuildsystemDirectoryStateType
std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
cmPropertyMap Properties;
+
+ std::vector<cmState::Snapshot> Children;
};
cmState::cmState(cmake* cm)
@@ -274,6 +276,7 @@ cmState::Snapshot cmState::Reset()
it->CompileOptionsBacktraces.clear();
it->DirectoryEnd = pos;
it->Properties.clear();
+ it->Children.clear();
}
this->PolicyStack.Clear();
@@ -800,7 +803,9 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
pos->Parent = origin;
pos->Root = origin;
pos->Vars = this->VarTree.Extend(origin);
- return cmState::Snapshot(this, pos);
+ cmState::Snapshot snapshot = cmState::Snapshot(this, pos);
+ originSnapshot.Position->BuildSystemDirectory->Children.push_back(snapshot);
+ return snapshot;
}
cmState::Snapshot
@@ -938,6 +943,11 @@ cmState::Snapshot::Snapshot(cmState* state)
{
}
+std::vector<cmState::Snapshot> cmState::Snapshot::GetChildren()
+{
+ return this->Position->BuildSystemDirectory->Children;
+}
+
cmState::Snapshot::Snapshot(cmState* state, PositionType position)
: State(state),
Position(position)