summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-27 14:04:07 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-08-27 14:04:07 (GMT)
commit6904b6efdc2ea35c3490ba33cb352b03ea3085f5 (patch)
tree1108c7e561412f01acf5bfa744d526a8656ee47b /Source/cmState.cxx
parenta97bb6ae3f70febd207ef2373287237249f082e5 (diff)
parent867b5be8b89c9b4f18ea604e1c61a154d0335c4c (diff)
downloadCMake-6904b6efdc2ea35c3490ba33cb352b03ea3085f5.zip
CMake-6904b6efdc2ea35c3490ba33cb352b03ea3085f5.tar.gz
CMake-6904b6efdc2ea35c3490ba33cb352b03ea3085f5.tar.bz2
Merge topic 'rm-cmLocalGenerator-Children'
867b5be8 cmLocalGenerator: Remove unused Children member. 6c832219 cmLocalGenerator: Implement child traversal in terms of cmState. 3fcf3837 Makefiles: Remove valueless cast. 223f4a66 cmLocalGenerator: Simplify condition. ae026f54 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 4e4c2c6..a401265 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)