diff options
author | Brad King <brad.king@kitware.com> | 2013-11-05 18:32:15 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-05 18:32:15 (GMT) |
commit | e313d397cd621960c57a2231b1eceeac72f20ac7 (patch) | |
tree | 997cdb4099a5144f1d7bcedc64122bf2b8898218 /Source | |
parent | 177f5e51d2a73202b44acfd8e26312c1480ffdd7 (diff) | |
parent | a1b9465bf85621f80f02b9903aa7b38a74676df1 (diff) | |
download | CMake-e313d397cd621960c57a2231b1eceeac72f20ac7.zip CMake-e313d397cd621960c57a2231b1eceeac72f20ac7.tar.gz CMake-e313d397cd621960c57a2231b1eceeac72f20ac7.tar.bz2 |
Merge topic 'fix-automoc-compile-definitions'
a1b9465 Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 24 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 1 |
2 files changed, 21 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index dd7311e..ea17afa 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1103,6 +1103,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(); @@ -1306,13 +1308,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 = @@ -1327,7 +1327,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) @@ -1344,7 +1343,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; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4d6e10f..92c3096 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -395,6 +395,7 @@ private: void WriteSummary(); void WriteSummary(cmTarget* target); + void FinalizeTargetCompileDefinitions(); virtual void PrintCompilerAdvice(std::ostream& os, std::string lang, const char* envVar); |