[Cmake-commits] CMake branch, next, updated. v2.8.12-4921-g501e2b1

Stephen Kelly steveire at gmail.com
Tue Nov 5 11:48:45 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  501e2b174a764c41a64878a7dfa82c3346a1d3a4 (commit)
       via  5ab51dd442cf1fb6019a282d1e364a15f6dcb5ec (commit)
      from  734ea519ea79af7a438adf1d3a7eea6fa63ec323 (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=501e2b174a764c41a64878a7dfa82c3346a1d3a4
commit 501e2b174a764c41a64878a7dfa82c3346a1d3a4
Merge: 734ea51 5ab51dd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Nov 5 11:48:36 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 5 11:48:36 2013 -0500

    Merge topic 'fix-automoc-compile-definitions' into next
    
    5ab51dd Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535).

diff --cc Source/cmGlobalGenerator.cxx
index 9855bd6,f940c9e..bc7d374
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@@ -1059,9 -956,11 +1059,11 @@@ void cmGlobalGenerator::Generate(
      return;
      }
  
+   this->FinalizeTargetCompileDefinitions();
+ 
    // Iterate through all targets and set up automoc for those which have
 -  // the AUTOMOC property set
 -  this->CreateAutomocTargets();
 +  // the AUTOMOC, AUTOUIC or AUTORCC property set
 +  this->CreateQtAutoGeneratorsTargets();
  
    // For each existing cmLocalGenerator
    unsigned int i;
@@@ -1300,9 -1177,27 +1299,26 @@@ void cmGlobalGenerator::FinalizeTargetC
                            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;
 -      this->ComputeTargetObjects(gt);
        generatorTargets[t] = gt;
        }
  
diff --cc Source/cmGlobalGenerator.h
index f2ff64b,80916ae..ba72cac
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@@ -395,11 -382,8 +395,12 @@@ private
  
    void WriteSummary();
    void WriteSummary(cmTarget* target);
+   void FinalizeTargetCompileDefinitions();
  
 +  virtual void PrintCompilerAdvice(std::ostream& os, std::string lang,
 +                                   const char* envVar);
 +  void CheckCompilerIdCompatibility(cmMakefile* mf, std::string lang);
 +
    cmExternalMakefileProjectGenerator* ExtraGenerator;
  
    // track files replaced during a Generate

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ab51dd442cf1fb6019a282d1e364a15f6dcb5ec
commit 5ab51dd442cf1fb6019a282d1e364a15f6dcb5ec
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Nov 4 10:51:37 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Nov 5 17:47:08 2013 +0100

    Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535).
    
    Extract FinalizeTargetCompileDefinitions from cmGeneratorTarget. call
    it early in the generate step to copy the directory-level compile
    definitions into the cmTarget.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7f2b592..f940c9e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -956,6 +956,8 @@ void cmGlobalGenerator::Generate()
     return;
     }
 
+  this->FinalizeTargetCompileDefinitions();
+
   // Iterate through all targets and set up automoc for those which have
   // the AUTOMOC property set
   this->CreateAutomocTargets();
@@ -1140,13 +1142,11 @@ void cmGlobalGenerator::CreateAutomocTargets()
 }
 
 //----------------------------------------------------------------------------
-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 =
@@ -1161,7 +1161,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)
@@ -1178,7 +1177,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;
       this->ComputeTargetObjects(gt);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 18aba24..80916ae 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -382,6 +382,7 @@ private:
 
   void WriteSummary();
   void WriteSummary(cmTarget* target);
+  void FinalizeTargetCompileDefinitions();
 
   cmExternalMakefileProjectGenerator* ExtraGenerator;
 
diff --git a/Tests/QtAutomoc/foo.h b/Tests/QtAutomoc/foo.h
index 32d4c8d..f23ec07 100644
--- a/Tests/QtAutomoc/foo.h
+++ b/Tests/QtAutomoc/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:
 Source/cmGlobalGenerator.cxx |   24 ++++++++++++++++++++----
 Source/cmGlobalGenerator.h   |    1 +
 Tests/QtAutogen/foo.h        |    5 ++++-
 3 files changed, 25 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list