diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-25 12:22:42 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-27 06:44:26 (GMT) |
commit | 79c3a2a8f72ea175533da9f323f88c507220486e (patch) | |
tree | 624bff47e0a7b47392b422a6f4920ccd65456674 /Source/cmGlobalGenerator.cxx | |
parent | c389f8bb07e900d805ca3163f47b06e3dbe4303b (diff) | |
download | CMake-79c3a2a8f72ea175533da9f323f88c507220486e.zip CMake-79c3a2a8f72ea175533da9f323f88c507220486e.tar.gz CMake-79c3a2a8f72ea175533da9f323f88c507220486e.tar.bz2 |
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.cxx | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index d53f0e3..3d2db42 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 { } |