[Cmake-commits] CMake branch, next, updated. v2.8.12-4906-g19f944f
Stephen Kelly
steveire at gmail.com
Tue Nov 5 09:38:44 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 19f944fe4d5b41d409654e30e9c03c5043bda9db (commit)
via 28ba5176d9cb13ba1793f9fc599038f92e6334f6 (commit)
from db76e18efa3c52a502877b8963839eded4dfc81f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19f944fe4d5b41d409654e30e9c03c5043bda9db
commit 19f944fe4d5b41d409654e30e9c03c5043bda9db
Merge: db76e18 28ba517
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Nov 5 09:38:43 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 5 09:38:43 2013 -0500
Merge topic 'fix-autogen-definitions' into next
28ba517 cmQtAutogen: Gather tool arguments after creating generator targets.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=28ba5176d9cb13ba1793f9fc599038f92e6334f6
commit 28ba5176d9cb13ba1793f9fc599038f92e6334f6
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Nov 4 10:34:54 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Nov 5 15:38:23 2013 +0100
cmQtAutogen: Gather tool arguments after creating generator targets.
One of the side-effects in cmGlobalGenerator::CreateGeneratorTargets
is that compile definitions from the makefile are appended to the
target. Compile definitions are read from the target directly for
generating the buildsystem, and generating the Autogen info too
early caused incomplete compile definitions to be used (#14535).
The compile definitions related code will be moved out of
CreateGeneratorTargets in a followup commit. However this change
also has the independent benefit that it causes the
GetLinkInterfaceDependentStringProperty method to be called in
SetupAutoGenerateTarget, after the creation of generator targets. In
CMake 4.0, the GetLinkInterfaceDependentStringProperty will move to
the cmGeneratorTarget class, and this is a necessary prerequisite to
that.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index eac54c3..85c467d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1095,9 +1095,12 @@ void cmGlobalGenerator::Generate()
return;
}
+#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;
@@ -1131,6 +1134,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)
@@ -1256,11 +1267,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 =
@@ -1289,11 +1298,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 4d6e10f..d08ae2a 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
diff --git a/Tests/QtAutogen/foo.h b/Tests/QtAutogen/foo.h
index 32d4c8d..f23ec07 100644
--- a/Tests/QtAutogen/foo.h
+++ b/Tests/QtAutogen/foo.h
@@ -16,7 +16,10 @@
#include <QObject>
-class Foo : public QObject
+class Foo
+#ifdef FOO
+ : public QObject
+#endif
{
Q_OBJECT
public:
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list