[Cmake-commits] CMake branch, next, updated. v2.8.12-4902-g9a6dc37

Stephen Kelly steveire at gmail.com
Tue Nov 5 09:37:03 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  9a6dc3717e504e781a0a6664207995a56095e363 (commit)
       via  0018cbd9077d577276a8947029113e122b078e00 (commit)
      from  8d75f6b5f6eb365136259f29a381017d0d960efb (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=9a6dc3717e504e781a0a6664207995a56095e363
commit 9a6dc3717e504e781a0a6664207995a56095e363
Merge: 8d75f6b 0018cbd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Nov 5 09:36:59 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 5 09:36:59 2013 -0500

    Merge topic 'fix-autogen-definitions' into next
    
    0018cbd cmQtAutogen: Gather tool arguments after creating generator targets.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0018cbd9077d577276a8947029113e122b078e00
commit 0018cbd9077d577276a8947029113e122b078e00
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:36:39 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..7d99abe 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1097,7 +1097,8 @@ void cmGlobalGenerator::Generate()
 
   // 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);
 
   // For each existing cmLocalGenerator
   unsigned int i;
@@ -1131,6 +1132,12 @@ void cmGlobalGenerator::Generate()
   // Create per-target generator information.
   this->CreateGeneratorTargets();
 
+  for (AutogensType::iterator it = autogens.begin(); it != autogens.end();
+       ++it)
+    {
+    it->first.SetupAutoGenerateTarget(it->second);
+    }
+
   // 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 +1263,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 +1294,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