Forráskód Böngészése

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.
Brad King 12 éve
szülő
commit
2e388cc3c2
1 módosított fájl, 8 hozzáadás és 0 törlés
  1. 8 0
      Source/cmGlobalGenerator.cxx

+ 8 - 0
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();