summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-04 21:10:07 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-04 21:14:49 (GMT)
commit2e388cc3c2c0f670b9f1f53a0fbc1217db3c72e3 (patch)
treeef24af287f6ef3f9ce340ad77f4606761cc22e13
parentc515dc574879448d66e2c5a27b9807d95a27fefd (diff)
downloadCMake-2e388cc3c2c0f670b9f1f53a0fbc1217db3c72e3.zip
CMake-2e388cc3c2c0f670b9f1f53a0fbc1217db3c72e3.tar.gz
CMake-2e388cc3c2c0f670b9f1f53a0fbc1217db3c72e3.tar.bz2
file(GENERATE): Clear internal records between configures
In the CMake interactive dialogs cmGlobalGenerator::Configure may run more than once. Clear the cmGlobalGenerator::EvaluationFiles data between configures to avoid accessing deleted data.
-rw-r--r--Source/cmGlobalGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7f2b592..5fefeba 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -848,6 +848,14 @@ void cmGlobalGenerator::Configure()
delete this->LocalGenerators[i];
}
this->LocalGenerators.clear();
+ for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
+ li = this->EvaluationFiles.begin();
+ li != this->EvaluationFiles.end();
+ ++li)
+ {
+ delete *li;
+ }
+ this->EvaluationFiles.clear();
this->TargetDependencies.clear();
this->TotalTargets.clear();
this->ImportedTargets.clear();