mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-24 15:38:54 -06:00
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:
@@ -848,6 +848,14 @@ void cmGlobalGenerator::Configure()
|
|||||||
delete this->LocalGenerators[i];
|
delete this->LocalGenerators[i];
|
||||||
}
|
}
|
||||||
this->LocalGenerators.clear();
|
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->TargetDependencies.clear();
|
||||||
this->TotalTargets.clear();
|
this->TotalTargets.clear();
|
||||||
this->ImportedTargets.clear();
|
this->ImportedTargets.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user