summaryrefslogtreecommitdiff
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-25 13:22:42 +0100
committerStephen Kelly <steveire@gmail.com>2015-10-27 07:44:26 +0100
commit79c3a2a8f72ea175533da9f323f88c507220486e (patch)
tree624bff47e0a7b47392b422a6f4920ccd65456674 /Source/cmGlobalGenerator.cxx
parentc389f8bb07e900d805ca3163f47b06e3dbe4303b (diff)
downloadcmake-79c3a2a8f72ea175533da9f323f88c507220486e.tar.gz
cmGlobalGenerator: Remove map from cmTarget to cmGeneratorTarget
The configure-time and generate-time types should be completely independent. Add ownership of cmGeneratorTarget instances to the cmLocalGenerator.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx26
1 files changed, 3 insertions, 23 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index d53f0e3ecd..3d2db422f2 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1208,8 +1208,6 @@ void cmGlobalGenerator::Configure()
void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)
{
this->CreateLocalGenerators();
- cmDeleteAll(this->GeneratorTargets);
- this->GeneratorTargets.clear();
this->CreateGeneratorTargets(targetTypes);
this->ComputeBuildFileGenerators();
}
@@ -1597,7 +1595,6 @@ void cmGlobalGenerator::CreateGeneratorTargets(
{
cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
- this->GeneratorTargets[t] = gt;
lg->AddGeneratorTarget(gt);
}
}
@@ -1622,9 +1619,9 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes)
j = mf->GetOwnedImportedTargets().begin();
j != mf->GetOwnedImportedTargets().end(); ++j)
{
- cmGeneratorTarget* gt =
- new cmGeneratorTarget(*j, this->LocalGenerators[i]);
- this->GeneratorTargets[*j] = gt;
+ cmLocalGenerator* lg = this->LocalGenerators[i];
+ cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg);
+ lg->AddOwnedImportedGeneratorTarget(gt);
importedMap[*j] = gt;
}
}
@@ -1641,9 +1638,6 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes)
//----------------------------------------------------------------------------
void cmGlobalGenerator::ClearGeneratorMembers()
{
- cmDeleteAll(this->GeneratorTargets);
- this->GeneratorTargets.clear();
-
cmDeleteAll(this->BuildExportSets);
this->BuildExportSets.clear();
@@ -1662,20 +1656,6 @@ void cmGlobalGenerator::ClearGeneratorMembers()
}
//----------------------------------------------------------------------------
-cmGeneratorTarget*
-cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
-{
- cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t);
- if(ti == this->GeneratorTargets.end())
- {
- this->CMakeInstance->IssueMessage(
- cmake::INTERNAL_ERROR, "Missing cmGeneratorTarget instance!");
- return 0;
- }
- return ti->second;
-}
-
-//----------------------------------------------------------------------------
void cmGlobalGenerator::ComputeTargetObjectDirectory(cmGeneratorTarget*) const
{
}