diff options
author | Brad King <brad.king@kitware.com> | 2013-11-06 13:39:08 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-06 13:39:08 (GMT) |
commit | 18985f6c2926725b08f5941205fe21c344c4b3ea (patch) | |
tree | efd7f0e35ec652c51beb02e999bf67aaa3ed5be8 /Source/cmGlobalGenerator.cxx | |
parent | ef3dc6507ea0e22d865d15d6231b5bdfacd8af14 (diff) | |
parent | 944277d09ebdf59f2ea32931516af568e897bcd5 (diff) | |
download | CMake-18985f6c2926725b08f5941205fe21c344c4b3ea.zip CMake-18985f6c2926725b08f5941205fe21c344c4b3ea.tar.gz CMake-18985f6c2926725b08f5941205fe21c344c4b3ea.tar.bz2 |
Merge topic 'refactor-autogen-setup'
944277d cmAutogen: Gather tool arguments after creating generator targets.
d2f4b1e cmAutogen: Rename method to InitializeAutogenTarget
45735f3 cmAutogen: Move autogen target creation to InitializeMocSourceFile.
20a234d cmAutogen: Extract some helper methods for autogen targets.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index c308f4b..71dd897 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1061,9 +1061,12 @@ void cmGlobalGenerator::Generate() this->FinalizeTargetCompileDefinitions(); +#ifdef CMAKE_BUILD_WITH_CMAKE // Iterate through all targets and set up automoc for those which have // the AUTOMOC, AUTOUIC or AUTORCC property set - this->CreateQtAutoGeneratorsTargets(); + AutogensType autogens; + this->CreateQtAutoGeneratorsTargets(autogens); +#endif // For each existing cmLocalGenerator unsigned int i; @@ -1097,6 +1100,14 @@ void cmGlobalGenerator::Generate() // Create per-target generator information. this->CreateGeneratorTargets(); +#ifdef CMAKE_BUILD_WITH_CMAKE + for (AutogensType::iterator it = autogens.begin(); it != autogens.end(); + ++it) + { + it->first.SetupAutoGenerateTarget(it->second); + } +#endif + // 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) @@ -1222,11 +1233,9 @@ bool cmGlobalGenerator::CheckTargets() } //---------------------------------------------------------------------------- -void cmGlobalGenerator::CreateQtAutoGeneratorsTargets() +void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) { #ifdef CMAKE_BUILD_WITH_CMAKE - typedef std::vector<std::pair<cmQtAutoGenerators, cmTarget*> > Autogens; - Autogens autogens; for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) { cmTargets& targets = @@ -1247,7 +1256,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets() && !target.IsImported()) { cmQtAutoGenerators autogen; - if(autogen.InitializeMocSourceFile(&target)) + if(autogen.InitializeAutogenTarget(&target)) { autogens.push_back(std::make_pair(autogen, &target)); } @@ -1255,11 +1264,8 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } } } - for (Autogens::iterator it = autogens.begin(); it != autogens.end(); - ++it) - { - it->first.SetupAutoGenerateTarget(it->second); - } +#else + (void)autogens; #endif } |