| 108 | } |
| 109 | |
| 110 | cmStateSnapshot cmStateSnapshot::GetCallStackParent() const |
| 111 | { |
| 112 | assert(this->State); |
| 113 | assert(this->Position != this->State->SnapshotData.Root()); |
| 114 | |
| 115 | cmStateSnapshot snapshot; |
| 116 | cmStateDetail::PositionType parentPos = this->Position; |
| 117 | while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || |
| 118 | parentPos->SnapshotType == cmStateEnums::VariableScopeType) { |
| 119 | ++parentPos; |
| 120 | } |
| 121 | if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || |
| 122 | parentPos->SnapshotType == cmStateEnums::BaseType) { |
| 123 | return snapshot; |
| 124 | } |
| 125 | |
| 126 | ++parentPos; |
| 127 | while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || |
| 128 | parentPos->SnapshotType == cmStateEnums::VariableScopeType) { |
| 129 | ++parentPos; |
| 130 | } |
| 131 | |
| 132 | if (parentPos == this->State->SnapshotData.Root()) { |
| 133 | return snapshot; |
| 134 | } |
| 135 | |
| 136 | snapshot = cmStateSnapshot(this->State, parentPos); |
| 137 | return snapshot; |
| 138 | } |
| 139 | |
| 140 | cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const |
| 141 | { |
no test coverage detected