summaryrefslogtreecommitdiff
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index dce60ff8eb..33a7f208f7 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -72,16 +72,7 @@ cmGlobalGenerator::~cmGlobalGenerator()
delete this->ExtraGenerator;
}
- for (std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
- setIt = this->ExportSets.begin();
- setIt != this->ExportSets.end();
- ++setIt)
- {
- for (unsigned int i = 0; i < setIt->second.size(); ++i)
- {
- delete setIt->second[i];
- }
- }
+ this->ClearExportSets();
}
// Find the make program for the generator, required for try compiles
@@ -683,6 +674,7 @@ bool cmGlobalGenerator::IsDependedOn(const char* project,
void cmGlobalGenerator::Configure()
{
this->FirstTimeProgress = 0.0f;
+ this->ClearExportSets();
// Delete any existing cmLocalGenerators
unsigned int i;
for (i = 0; i < this->LocalGenerators.size(); ++i)
@@ -1232,6 +1224,21 @@ void cmGlobalGenerator::AddTargetToExports(const char* exportSetName,
}
}
+//----------------------------------------------------------------------------
+void cmGlobalGenerator::ClearExportSets()
+{
+ for(std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
+ setIt = this->ExportSets.begin();
+ setIt != this->ExportSets.end(); ++setIt)
+ {
+ for(unsigned int i = 0; i < setIt->second.size(); ++i)
+ {
+ delete setIt->second[i];
+ }
+ }
+ this->ExportSets.clear();
+}
+
const std::vector<cmTargetExport*>* cmGlobalGenerator::GetExportSet(
const char* name) const
{