diff options
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index f7c4b94..c308f4b 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1059,6 +1059,8 @@ void cmGlobalGenerator::Generate() return; } + this->FinalizeTargetCompileDefinitions(); + // Iterate through all targets and set up automoc for those which have // the AUTOMOC, AUTOUIC or AUTORCC property set this->CreateQtAutoGeneratorsTargets(); @@ -1262,13 +1264,11 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } //---------------------------------------------------------------------------- -void cmGlobalGenerator::CreateGeneratorTargets() +void cmGlobalGenerator::FinalizeTargetCompileDefinitions() { // Construct per-target generator information. for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) { - cmGeneratorTargetsType generatorTargets; - cmMakefile *mf = this->LocalGenerators[i]->GetMakefile(); const std::vector<cmValueWithOrigin> noconfig_compile_definitions = @@ -1283,7 +1283,6 @@ void cmGlobalGenerator::CreateGeneratorTargets() { cmTarget* t = &ti->second; - { for (std::vector<cmValueWithOrigin>::const_iterator it = noconfig_compile_definitions.begin(); it != noconfig_compile_definitions.end(); ++it) @@ -1300,7 +1299,24 @@ void cmGlobalGenerator::CreateGeneratorTargets() mf->GetProperty(defPropName.c_str())); } } + } +} + +//---------------------------------------------------------------------------- +void cmGlobalGenerator::CreateGeneratorTargets() +{ + // Construct per-target generator information. + for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) + { + cmGeneratorTargetsType generatorTargets; + + cmMakefile *mf = this->LocalGenerators[i]->GetMakefile(); + cmTargets& targets = mf->GetTargets(); + for(cmTargets::iterator ti = targets.begin(); + ti != targets.end(); ++ti) + { + cmTarget* t = &ti->second; cmGeneratorTarget* gt = new cmGeneratorTarget(t); this->GeneratorTargets[t] = gt; generatorTargets[t] = gt; |