From 83dc483e4e35b528a5ece7a336399a994bd3f67e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 3 May 2015 20:36:26 +0200 Subject: cmState: Truncate snapshot data in Initialize. When Configure is executed multiple times with the same cmake instance (either using CTest --two-config or a interactive gui), the location and structural data was preserved though it would not be used again. Fix that by clearing the data in a method called early in the configure step. --- Source/cmState.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 24cbc4a..67a2274 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -22,7 +22,6 @@ cmState::cmState(cmake* cm) : CMakeInstance(cm), IsInTryCompile(false) { - this->CreateSnapshot(Snapshot()); this->Initialize(); } @@ -194,8 +193,12 @@ void cmState::RemoveCacheEntryProperty(std::string const& key, void cmState::Initialize() { this->GlobalProperties.clear(); - this->PropertyDefinitions.clear(); + this->Locations.clear(); + this->OutputLocations.clear(); + this->ParentPositions.clear(); + + this->CreateSnapshot(Snapshot()); this->DefineProperty ("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY, "", "", true); -- cgit v0.12