diff options
author | Brad King <brad.king@kitware.com> | 2013-10-30 18:55:35 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-30 18:55:35 (GMT) |
commit | 8a6e82724c42920855c2348e914636f52a0c55d5 (patch) | |
tree | 9fc53980cac867f2ea8aaf94ee10a96364459ce4 /Source/cmGlobalGenerator.cxx | |
parent | 6e900fbe6970981f8c73500581df99fa6b955fa1 (diff) | |
parent | 638843af984281c67edcc9ea9e05712ac9075d04 (diff) | |
download | CMake-8a6e82724c42920855c2348e914636f52a0c55d5.zip CMake-8a6e82724c42920855c2348e914636f52a0c55d5.tar.gz CMake-8a6e82724c42920855c2348e914636f52a0c55d5.tar.bz2 |
Merge topic 'use-generator-target'
638843a Remove the Location member from cmTarget.
90ef1cf Move GenerateTargetManifest to cmGeneratorTarget.
25f1df3 Split CreateGeneratorTargets into two methods.
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 465763d..8a8d61a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1128,6 +1128,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) @@ -1141,8 +1144,7 @@ void cmGlobalGenerator::Generate() this->LocalGenerators[i]->GenerateTargetManifest(); } - // Create per-target generator information. - this->CreateGeneratorTargets(); + this->ComputeGeneratorTargetObjects(); this->ProcessEvaluationFiles(); @@ -1336,7 +1338,6 @@ void cmGlobalGenerator::CreateGeneratorTargets() cmGeneratorTarget* gt = new cmGeneratorTarget(t); this->GeneratorTargets[t] = gt; - this->ComputeTargetObjects(gt); generatorTargets[t] = gt; } @@ -1354,6 +1355,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(); |