summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-04 09:34:54 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-11-05 19:17:34 (GMT)
commit944277d09ebdf59f2ea32931516af568e897bcd5 (patch)
tree8215b50c283421ef7f348e8366472a5ffce9da45
parentd2f4b1e3cf934eab02282ee312408601d6756a31 (diff)
downloadCMake-944277d09ebdf59f2ea32931516af568e897bcd5.zip
CMake-944277d09ebdf59f2ea32931516af568e897bcd5.tar.gz
CMake-944277d09ebdf59f2ea32931516af568e897bcd5.tar.bz2
cmAutogen: Gather tool arguments after creating generator targets.
This change causes the GetLinkInterfaceDependentStringProperty method, called in SetupAutoGenerateTarget, after the creation of generator targets. In CMake 4.0, the GetLinkInterfaceDependentStringProperty will move to the cmGeneratorTarget class, and this patch is a necessary prerequisite to that.
-rw-r--r--Source/cmGlobalGenerator.cxx24
-rw-r--r--Source/cmGlobalGenerator.h4
2 files changed, 18 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index b6f491a..e1842f7 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1105,9 +1105,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;
@@ -1141,6 +1144,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)
@@ -1266,11 +1277,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 =
@@ -1299,11 +1308,8 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
}
}
}
- for (Autogens::iterator it = autogens.begin(); it != autogens.end();
- ++it)
- {
- it->first.SetupAutoGenerateTarget(it->second);
- }
+#else
+ (void)autogens;
#endif
}
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 92c3096..b9f4bd0 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -32,6 +32,7 @@ class cmTarget;
class cmInstallTargetGenerator;
class cmInstallFilesGenerator;
class cmExportBuildFileGenerator;
+class cmQtAutoGenerators;
/** \class cmGlobalGenerator
* \brief Responable for overseeing the generation process for the entire tree
@@ -323,7 +324,8 @@ protected:
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS();
bool CheckTargets();
- void CreateQtAutoGeneratorsTargets();
+ typedef std::vector<std::pair<cmQtAutoGenerators, cmTarget*> > AutogensType;
+ void CreateQtAutoGeneratorsTargets(AutogensType& autogens);
// Fill the ProjectMap, this must be called after LocalGenerators