summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShane Parris <shane.lee.parris@gmail.com>2018-08-09 12:51:29 -0400
committerBrad King <brad.king@kitware.com>2018-08-09 13:03:50 -0400
commit6f3b9e8b9506b4631b70cf506152defa8f9e54e0 (patch)
treea9ee0c547f24164c2958a4b34dab13082a8e6658
parentc4ab098097f4fe1bc85ee29c6de390dff435f63f (diff)
downloadcmake-6f3b9e8b9506b4631b70cf506152defa8f9e54e0.tar.gz
cmState: Clear GlobVerificationManager state on Reset
It should not persist across multiple configure rounds. Fixes: #18208
-rw-r--r--Source/cmGlobVerificationManager.cxx7
-rw-r--r--Source/cmGlobVerificationManager.h3
-rw-r--r--Source/cmState.cxx1
3 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlobVerificationManager.cxx b/Source/cmGlobVerificationManager.cxx
index e23b6eaeac..189b517a05 100644
--- a/Source/cmGlobVerificationManager.cxx
+++ b/Source/cmGlobVerificationManager.cxx
@@ -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();
+}
diff --git a/Source/cmGlobVerificationManager.h b/Source/cmGlobVerificationManager.h
index 4508602fed..cf04c97c72 100644
--- a/Source/cmGlobVerificationManager.h
+++ b/Source/cmGlobVerificationManager.h
@@ -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;
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index a57be4db6c..b2f6091723 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -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();