cmState: Store Children states in parent state.
This commit is contained in:
parent
f4150bd88d
commit
ae026f5458
|
@ -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)
|
||||
|
|
|
@ -65,6 +65,8 @@ public:
|
|||
void SetListFile(std::string const& listfile);
|
||||
|
||||
std::string GetExecutionListFile() const;
|
||||
|
||||
std::vector<Snapshot> GetChildren();
|
||||
std::string GetEntryPointCommand() const;
|
||||
long GetEntryPointLine() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue