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.
This commit is contained in:
Brad King 2013-11-04 16:10:07 -05:00
parent c515dc5748
commit 2e388cc3c2
1 changed files with 8 additions and 0 deletions

View File

@ -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();