diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-10-06 16:35:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-10-27 19:29:34 (GMT) |
commit | 25f1df3e816b62a518206cb88f69fdb15b2eebc9 (patch) | |
tree | ea8db5e42264c0b0bcd1004818264b8ea8488c2a /Source/cmGlobalGenerator.cxx | |
parent | b63c71aa35fffeef550ccf7f60382cbe794635ac (diff) | |
download | CMake-25f1df3e816b62a518206cb88f69fdb15b2eebc9.zip CMake-25f1df3e816b62a518206cb88f69fdb15b2eebc9.tar.gz CMake-25f1df3e816b62a518206cb88f69fdb15b2eebc9.tar.bz2 |
Split CreateGeneratorTargets into two methods.
As the generate-time-related API is moving to cmGeneratorTarget, almost
all of generation code needs to be able to access instances of it.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index e26f59f..1b0ec4d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1058,6 +1058,9 @@ void cmGlobalGenerator::Generate() this->LocalGenerators[i]->AddHelperCommands(); } + // Create per-target generator information. + this->CreateGeneratorTargets(); + // Trace the dependencies, after that no custom commands should be added // because their dependencies might not be handled correctly for (i = 0; i < this->LocalGenerators.size(); ++i) @@ -1071,8 +1074,7 @@ void cmGlobalGenerator::Generate() this->LocalGenerators[i]->GenerateTargetManifest(); } - // Create per-target generator information. - this->CreateGeneratorTargets(); + this->ComputeGeneratorTargetObjects(); this->ProcessEvaluationFiles(); @@ -1263,7 +1265,6 @@ void cmGlobalGenerator::CreateGeneratorTargets() cmGeneratorTarget* gt = new cmGeneratorTarget(t); this->GeneratorTargets[t] = gt; - this->ComputeTargetObjects(gt); generatorTargets[t] = gt; } @@ -1281,6 +1282,25 @@ void cmGlobalGenerator::CreateGeneratorTargets() } //---------------------------------------------------------------------------- +void cmGlobalGenerator::ComputeGeneratorTargetObjects() +{ + // Construct per-target generator information. + for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) + { + cmMakefile *mf = this->LocalGenerators[i]->GetMakefile(); + cmGeneratorTargetsType targets = mf->GetGeneratorTargets(); + for(cmGeneratorTargetsType::iterator ti = targets.begin(); + ti != targets.end(); ++ti) + { + cmGeneratorTarget* gt = ti->second; + gt->ClassifySources(); + gt->LookupObjectLibraries(); + this->ComputeTargetObjects(gt); + } + } +} + +//---------------------------------------------------------------------------- void cmGlobalGenerator::ClearGeneratorTargets() { for(cmGeneratorTargetsType::iterator i = this->GeneratorTargets.begin(); |