diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-12 22:03:23 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-09-19 13:29:07 (GMT) |
commit | 14bf7783f4de829f62041d1dbf3989160820b2b7 (patch) | |
tree | b0ee83b947e21c3ae73efaac965668c3e686dc96 /Source/cmGlobalGenerator.cxx | |
parent | f428ca25f5f983cb57eb009a330c09506ee81587 (diff) | |
download | CMake-14bf7783f4de829f62041d1dbf3989160820b2b7.zip CMake-14bf7783f4de829f62041d1dbf3989160820b2b7.tar.gz CMake-14bf7783f4de829f62041d1dbf3989160820b2b7.tar.bz2 |
Store cmGeneratorTargets with the makefile.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 578fa9e..0b06790 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1075,8 +1075,10 @@ void cmGlobalGenerator::CreateGeneratorTargets() // Construct per-target generator information. for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) { - cmTargets& targets = - this->LocalGenerators[i]->GetMakefile()->GetTargets(); + cmGeneratorTargetsType generatorTargets; + + cmMakefile *mf = this->LocalGenerators[i]->GetMakefile(); + cmTargets& targets = mf->GetTargets(); for(cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) { @@ -1084,14 +1086,16 @@ void cmGlobalGenerator::CreateGeneratorTargets() cmGeneratorTarget* gt = new cmGeneratorTarget(t); this->GeneratorTargets[t] = gt; this->ComputeTargetObjects(gt); + generatorTargets[t] = gt; } + mf->SetGeneratorTargets(generatorTargets); } } //---------------------------------------------------------------------------- void cmGlobalGenerator::ClearGeneratorTargets() { - for(GeneratorTargetsType::iterator i = this->GeneratorTargets.begin(); + for(cmGeneratorTargetsType::iterator i = this->GeneratorTargets.begin(); i != this->GeneratorTargets.end(); ++i) { delete i->second; @@ -1102,7 +1106,7 @@ void cmGlobalGenerator::ClearGeneratorTargets() //---------------------------------------------------------------------------- cmGeneratorTarget* cmGlobalGenerator::GetGeneratorTarget(cmTarget* t) const { - GeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t); + cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t); if(ti == this->GeneratorTargets.end()) { this->CMakeInstance->IssueMessage( |