summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-25 11:22:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-27 06:44:23 (GMT)
commit0c97d32f7a592a768d614c19b3fd48eab245a2c4 (patch)
tree49164276c41a985b4217a2b1a46c46283fcdc368 /Source/cmGlobalXCodeGenerator.cxx
parent383bfd95432990365ac5c7fc3ab190bfb05cbec1 (diff)
downloadCMake-0c97d32f7a592a768d614c19b3fd48eab245a2c4.zip
CMake-0c97d32f7a592a768d614c19b3fd48eab245a2c4.tar.gz
CMake-0c97d32f7a592a768d614c19b3fd48eab245a2c4.tar.bz2
cmGlobalGenerator: Remove direct storage of targets
Find the target by looping when needed.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 42f9758..6d4fc1f 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1362,12 +1362,17 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator::ForceLinkerLanguages()
{
- // This makes sure all targets link using the proper language.
- for(TargetMap::const_iterator
- ti = this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti)
+ for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
{
- cmGeneratorTarget* gt = this->GetGeneratorTarget(ti->second);
- this->ForceLinkerLanguage(gt);
+ std::vector<cmGeneratorTarget*> tgts =
+ this->LocalGenerators[i]->GetGeneratorTargets();
+ // All targets depend on the build-system check target.
+ for(std::vector<cmGeneratorTarget*>::const_iterator ti = tgts.begin();
+ ti != tgts.end(); ++ti)
+ {
+ // This makes sure all targets link using the proper language.
+ this->ForceLinkerLanguage(*ti);
+ }
}
}