mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
cmStateSnapshot: Invert CanPopPolicyScope return value to match name
This commit is contained in:
@@ -4605,7 +4605,7 @@ void cmMakefile::PopSnapshot(bool reportError)
|
||||
// cmStateSnapshot manages nested policy scopes within it.
|
||||
// Since the scope corresponding to the snapshot is closing,
|
||||
// reject any still-open nested policy scopes with an error.
|
||||
while (!this->StateSnapshot.CanPopPolicyScope()) {
|
||||
while (this->StateSnapshot.CanPopPolicyScope()) {
|
||||
if (reportError) {
|
||||
this->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"cmake_policy PUSH without matching POP");
|
||||
|
||||
@@ -148,7 +148,7 @@ bool cmStateSnapshot::PopPolicy()
|
||||
|
||||
bool cmStateSnapshot::CanPopPolicyScope()
|
||||
{
|
||||
return this->Position->Policies == this->Position->PolicyScope;
|
||||
return this->Position->Policies != this->Position->PolicyScope;
|
||||
}
|
||||
|
||||
void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id,
|
||||
|
||||
Reference in New Issue
Block a user