mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 13:48:33 -05:00
cmState: Add GetCallStackParent method.
This commit is contained in:
@@ -854,6 +854,28 @@ cmState::Snapshot cmState::Snapshot::GetBuildsystemDirectoryParent() const
|
|||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmState::Snapshot cmState::Snapshot::GetCallStackParent() const
|
||||||
|
{
|
||||||
|
assert(this->State);
|
||||||
|
assert(this->Position != this->State->SnapshotData.Root());
|
||||||
|
|
||||||
|
Snapshot snapshot;
|
||||||
|
if (this->Position->SnapshotType == cmState::BuildsystemDirectoryType)
|
||||||
|
{
|
||||||
|
return snapshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
PositionType parentPos = this->Position;
|
||||||
|
++parentPos;
|
||||||
|
if (parentPos == this->State->SnapshotData.Root())
|
||||||
|
{
|
||||||
|
return snapshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
snapshot = Snapshot(this->State, parentPos);
|
||||||
|
return snapshot;
|
||||||
|
}
|
||||||
|
|
||||||
cmState* cmState::Snapshot::GetState() const
|
cmState* cmState::Snapshot::GetState() const
|
||||||
{
|
{
|
||||||
return this->State;
|
return this->State;
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public:
|
|||||||
|
|
||||||
bool IsValid() const;
|
bool IsValid() const;
|
||||||
Snapshot GetBuildsystemDirectoryParent() const;
|
Snapshot GetBuildsystemDirectoryParent() const;
|
||||||
|
Snapshot GetCallStackParent() const;
|
||||||
|
|
||||||
cmState* GetState() const;
|
cmState* GetState() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user