cmState: Clear GlobVerificationManager state on Reset

It should not persist across multiple configure rounds.

Fixes: #18208
This commit is contained in:
Shane Parris 2018-08-09 12:51:29 -04:00 committed by Brad King
parent c4ab098097
commit 6f3b9e8b95
3 changed files with 11 additions and 0 deletions

View File

@ -170,3 +170,10 @@ void cmGlobVerificationManager::AddCacheEntry(
value.Backtraces.emplace_back(variable, backtrace);
}
}
void cmGlobVerificationManager::Reset()
{
this->Cache.clear();
this->VerifyScript.clear();
this->VerifyStamp.clear();
}

View File

@ -37,6 +37,9 @@ protected:
const std::string& variable,
const cmListFileBacktrace& bt);
///! Clear the glob cache for state reset.
void Reset();
///! Check targets should be written in generated build system.
bool DoWriteVerifyTarget() const;

View File

@ -267,6 +267,7 @@ cmStateSnapshot cmState::Reset()
{
this->GlobalProperties.clear();
this->PropertyDefinitions.clear();
this->GlobVerificationManager->Reset();
cmStateDetail::PositionType pos = this->SnapshotData.Truncate();
this->ExecutionListFiles.Truncate();