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  9dfac4695e4d83b19af0169e775b8b401adc0503 (commit)
       via  f119867176ba254401ec1f278fa623ff28ba3fc9 (commit)
      from  b5f27dd140db8600c32ecd266ab902a307144f2e (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=9dfac4695e4d83b19af0169e775b8b401adc0503
commit 9dfac4695e4d83b19af0169e775b8b401adc0503
Merge: b5f27dd f119867
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Thu Dec 5 19:43:36 2013 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Dec 5 19:43:36 2013 -0500

    Merge topic 'INTERFACE_AUTOUIC_OPTIONS' into next
    
    f119867 cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from 
dependencies.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f119867176ba254401ec1f278fa623ff28ba3fc9
commit f119867176ba254401ec1f278fa623ff28ba3fc9
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Dec 3 13:26:51 2013 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Fri Dec 6 01:43:04 2013 +0100

    cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.
    
    Revert the origin-tracking infrastructure from commit 98093c45 (QtAutoUic:
    Add INTERFACE_AUTOUIC_OPTIONS target property., 2013-11-20). Use the
    compatibility-tracking for compatible strings instead.
    
    If two different dependencies require different AUTOUIC_OPTIONS,
    cmake will now appropriately issue an error.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ab9b157..c1e4eee 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -135,7 +135,6 @@ public:
   };
   std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
   std::vector<TargetPropertyEntry*> CompileOptionsEntries;
-  std::vector<TargetPropertyEntry*> AutoUicOptionsEntries;
   std::vector<TargetPropertyEntry*> CompileDefinitionsEntries;
   std::vector<cmValueWithOrigin> LinkInterfacePropertyEntries;
 
@@ -144,14 +143,11 @@ public:
   mutable std::map<std::string, std::vector<TargetPropertyEntry*> >
                                 CachedLinkInterfaceCompileOptionsEntries;
   mutable std::map<std::string, std::vector<TargetPropertyEntry*> >
-                                CachedLinkInterfaceAutoUicOptionsEntries;
-  mutable std::map<std::string, std::vector<TargetPropertyEntry*> >
                                 CachedLinkInterfaceCompileDefinitionsEntries;
 
   mutable std::map<std::string, bool> CacheLinkInterfaceIncludeDirectoriesDone;
   mutable std::map<std::string, bool> CacheLinkInterfaceCompileDefinitionsDone;
   mutable std::map<std::string, bool> CacheLinkInterfaceCompileOptionsDone;
-  mutable std::map<std::string, bool> CacheLinkInterfaceAutoUicOptionsDone;
 };
 
 //----------------------------------------------------------------------------
@@ -186,7 +182,6 @@ cmTargetInternals::~cmTargetInternals()
 {
   deleteAndClear(this->CachedLinkInterfaceIncludeDirectoriesEntries);
   deleteAndClear(this->CachedLinkInterfaceCompileOptionsEntries);
-  deleteAndClear(this->CachedLinkInterfaceAutoUicOptionsEntries);
   deleteAndClear(this->CachedLinkInterfaceCompileDefinitionsEntries);
 }
 
@@ -1478,17 +1473,6 @@ void cmTarget::SetProperty(const char* prop, const char* 
value)
                           new cmTargetInternals::TargetPropertyEntry(cge));
     return;
     }
-  if(strcmp(prop,"AUTOUIC_OPTIONS") == 0)
-    {
-    cmListFileBacktrace lfbt;
-    this->Makefile->GetBacktrace(lfbt);
-    cmGeneratorExpression ge(lfbt);
-    deleteAndClear(this->Internal->AutoUicOptionsEntries);
-    cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
-    this->Internal->AutoUicOptionsEntries.push_back(
-                          new cmTargetInternals::TargetPropertyEntry(cge));
-    return;
-    }
   if(strcmp(prop,"COMPILE_DEFINITIONS") == 0)
     {
     cmListFileBacktrace lfbt;
@@ -1563,15 +1547,6 @@ void cmTarget::AppendProperty(const char* prop, const 
char* value,
               new cmTargetInternals::TargetPropertyEntry(ge.Parse(value)));
     return;
     }
-  if(strcmp(prop,"AUTOUIC_OPTIONS") == 0)
-    {
-    cmListFileBacktrace lfbt;
-    this->Makefile->GetBacktrace(lfbt);
-    cmGeneratorExpression ge(lfbt);
-    this->Internal->AutoUicOptionsEntries.push_back(
-              new cmTargetInternals::TargetPropertyEntry(ge.Parse(value)));
-    return;
-    }
   if(strcmp(prop,"COMPILE_DEFINITIONS") == 0)
     {
     cmListFileBacktrace lfbt;
@@ -2071,100 +2046,26 @@ static void processCompileOptions(cmTarget const* tgt,
 void cmTarget::GetAutoUicOptions(std::vector<std::string> &result,
                                  const char *config) const
 {
-  std::set<std::string> uniqueOptions;
-  cmListFileBacktrace lfbt;
-
-  cmGeneratorExpressionDAGChecker dagChecker(lfbt,
-                                              this->GetName(),
-                                              "AUTOUIC_OPTIONS", 0, 0);
-
-  std::vector<std::string> debugProperties;
-  const char *debugProp =
-              this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
-  if (debugProp)
-    {
-    cmSystemTools::ExpandListArgument(debugProp, debugProperties);
-    }
-
-  bool debugOptions = !this->DebugCompileOptionsDone
-                    && std::find(debugProperties.begin(),
-                                 debugProperties.end(),
-                                 "AUTOUIC_OPTIONS")
-                        != debugProperties.end();
-
-  if (this->Makefile->IsGeneratingBuildSystem())
-    {
-    this->DebugAutoUicOptionsDone = true;
-    }
-
-  processCompileOptions(this,
-                            this->Internal->AutoUicOptionsEntries,
-                            result,
-                            uniqueOptions,
-                            &dagChecker,
-                            config,
-                            debugOptions);
-
-  std::string configString = config ? config : "";
-  if (!this->Internal->CacheLinkInterfaceAutoUicOptionsDone[configString])
+  const char *prop
+            = this->GetLinkInterfaceDependentStringProperty("AUTOUIC_OPTIONS",
+                                                            config);
+  if (!prop)
     {
-    for (std::vector<cmValueWithOrigin>::const_iterator
-        it = this->Internal->LinkInterfacePropertyEntries.begin(),
-        end = this->Internal->LinkInterfacePropertyEntries.end();
-        it != end; ++it)
-      {
-      if (!cmGeneratorExpression::IsValidTargetName(it->Value)
-          && cmGeneratorExpression::Find(it->Value) == std::string::npos)
-        {
-        continue;
-        }
-      {
-      cmGeneratorExpression ge(lfbt);
-      cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
-                                                        ge.Parse(it->Value);
-      std::string targetResult = cge->Evaluate(this->Makefile, config,
-                                        false, this, 0, 0);
-      if (!this->Makefile->FindTargetToUse(targetResult.c_str()))
-        {
-        continue;
-        }
-      }
-      std::string optionGenex = "$<TARGET_PROPERTY:" +
-                              it->Value + ",INTERFACE_AUTOUIC_OPTIONS>";
-      if (cmGeneratorExpression::Find(it->Value) != std::string::npos)
-        {
-        // Because it->Value is a generator expression, ensure that it
-        // evaluates to the non-empty string before being used in the
-        // TARGET_PROPERTY expression.
-        optionGenex = "$<$<BOOL:" + it->Value + ">:" + optionGenex + ">";
-        }
-      cmGeneratorExpression ge(it->Backtrace);
-      cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(
-                                                                optionGenex);
-
-      this->Internal
-        ->CachedLinkInterfaceAutoUicOptionsEntries[configString].push_back(
-                        new cmTargetInternals::TargetPropertyEntry(cge,
-                                                              it->Value));
-      }
+    return;
     }
+  cmListFileBacktrace lfbt;
+  cmGeneratorExpression ge(lfbt);
 
-  processCompileOptions(this,
-    this->Internal->CachedLinkInterfaceAutoUicOptionsEntries[configString],
-                            result,
-                            uniqueOptions,
-                            &dagChecker,
-                            config,
-                            debugOptions);
-
-  if (!this->Makefile->IsGeneratingBuildSystem())
-    {
-    deleteAndClear(this->Internal->CachedLinkInterfaceAutoUicOptionsEntries);
-    }
-  else
-    {
-    this->Internal->CacheLinkInterfaceAutoUicOptionsDone[configString] = true;
-    }
+  cmGeneratorExpressionDAGChecker dagChecker(lfbt,
+                                      this->GetName(),
+                                      "AUTOUIC_OPTIONS", 0, 0);
+  cmSystemTools::ExpandListArgument(ge.Parse(prop)
+                                      ->Evaluate(this->Makefile,
+                                                config,
+                                                false,
+                                                this,
+                                                &dagChecker),
+                                  result);
 }
 
 //----------------------------------------------------------------------------
@@ -2874,24 +2775,6 @@ const char *cmTarget::GetProperty(const char* prop,
       }
     return output.c_str();
     }
-  if(strcmp(prop,"AUTOUIC_OPTIONS") == 0)
-    {
-    static std::string output;
-    output = "";
-    std::string sep;
-    typedef cmTargetInternals::TargetPropertyEntry
-                                TargetPropertyEntry;
-    for (std::vector<TargetPropertyEntry*>::const_iterator
-        it = this->Internal->AutoUicOptionsEntries.begin(),
-        end = this->Internal->AutoUicOptionsEntries.end();
-        it != end; ++it)
-      {
-      output += sep;
-      output += (*it)->ge->GetInput();
-      sep = ";";
-      }
-    return output.c_str();
-    }
   if(strcmp(prop,"COMPILE_DEFINITIONS") == 0)
     {
     static std::string output;
@@ -4502,7 +4385,7 @@ std::string compatibilityAgree(CompatibleType t, bool 
dominant)
     {
     case BoolType:
     case StringType:
-      return "(Agree)\n";
+      return dominant ? "(Disagree)\n" : "(Agree)\n";
     case NumberMaxType:
     case NumberMinType:
       return dominant ? "(Dominant)\n" : "(Ignored)\n";
@@ -4592,6 +4475,8 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget 
const* tgt,
         {
         PropertyType consistent = consistentProperty(propContent,
                                                      ifacePropContent, t);
+        report += reportEntry;
+        report += compatibilityAgree(t, propContent != consistent);
         if (!consistent)
           {
           cmOStringStream e;
@@ -4604,8 +4489,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget 
const* tgt,
           }
         else
           {
-          report += reportEntry;
-          report += compatibilityAgree(t, propContent != consistent);
           propContent = consistent;
           continue;
           }
@@ -4630,6 +4513,8 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget 
const* tgt,
         {
         PropertyType consistent = consistentProperty(propContent,
                                                      ifacePropContent, t);
+        report += reportEntry;
+        report += compatibilityAgree(t, propContent != consistent);
         if (!consistent)
           {
           cmOStringStream e;
@@ -4643,8 +4528,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget 
const* tgt,
           }
         else
           {
-          report += reportEntry;
-          report += compatibilityAgree(t, propContent != consistent);
           propContent = consistent;
           continue;
           }
@@ -4663,6 +4546,8 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget 
const* tgt,
           {
           PropertyType consistent = consistentProperty(propContent,
                                                        ifacePropContent, t);
+          report += reportEntry;
+          report += compatibilityAgree(t, propContent != consistent);
           if (!consistent)
             {
             cmOStringStream e;
@@ -4675,8 +4560,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget 
const* tgt,
             }
           else
             {
-            report += reportEntry;
-            report += compatibilityAgree(t, propContent != consistent);
             propContent = consistent;
             continue;
             }
@@ -4811,7 +4694,8 @@ bool 
cmTarget::IsLinkInterfaceDependentStringProperty(const std::string &p,
     {
     return false;
     }
-  return isLinkDependentProperty(this, p, "COMPATIBLE_INTERFACE_STRING",
+  return (p == "AUTOUIC_OPTIONS") ||
+    isLinkDependentProperty(this, p, "COMPATIBLE_INTERFACE_STRING",
                                  config);
 }
 
@@ -6230,7 +6114,6 @@ cmTargetInternalPointer::~cmTargetInternalPointer()
 {
   deleteAndClear(this->Pointer->IncludeDirectoriesEntries);
   deleteAndClear(this->Pointer->CompileOptionsEntries);
-  deleteAndClear(this->Pointer->AutoUicOptionsEntries);
   deleteAndClear(this->Pointer->CompileDefinitionsEntries);
   delete this->Pointer;
 }
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 2f4be84..3f5a5d1 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -698,7 +698,6 @@ private:
   mutable bool DebugIncludesDone;
   mutable std::map<std::string, bool> DebugCompatiblePropertiesDone;
   mutable bool DebugCompileOptionsDone;
-  mutable bool DebugAutoUicOptionsDone;
   mutable bool DebugCompileDefinitionsDone;
   mutable std::set<std::string> LinkImplicitNullProperties;
   bool BuildInterfaceIncludesAppended;
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 593921f..96b0543 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -94,6 +94,9 @@ if(NOT WIN32)
     add_RunCMake_test(VisibilityPreset)
   endif()
 endif()
+if (QT4_FOUND)
+  set(CompatibleInterface_ARGS 
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
+endif()
 add_RunCMake_test(CompatibleInterface)
 add_RunCMake_test(Syntax)
 
diff --git a/Tests/RunCMake/CompatibleInterface/AutoUic-result.txt 
b/Tests/RunCMake/CompatibleInterface/AutoUic-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/AutoUic-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/AutoUic-stderr.txt 
b/Tests/RunCMake/CompatibleInterface/AutoUic-stderr.txt
new file mode 100644
index 0000000..09f9461
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/AutoUic-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error: The INTERFACE_AUTOUIC_OPTIONS property of "OtherI18n" does
+not agree with the value of AUTOUIC_OPTIONS already determined
+for "LibWidget".
+
+CMake Debug Log:
+  String compatibility of property "AUTOUIC_OPTIONS" for target "LibWidget"
+  \(result: "-tr;ki18n"\):
+
+   \* Target "LibWidget" property not set.
+   \* Target "KI18n" property value "-tr;ki18n" \(Interface set\)
+   \* Target "OtherI18n" property value "-tr;otheri18n" \(Disagree\)
diff --git a/Tests/RunCMake/CompatibleInterface/AutoUic.cmake 
b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
new file mode 100644
index 0000000..86bd5a0
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
@@ -0,0 +1,22 @@
+
+find_package(Qt4 REQUIRED)
+
+set(QT_CORE_TARGET Qt4::QtCore)
+set(QT_GUI_TARGET Qt4::QtGui)
+
+set(CMAKE_AUTOUIC ON)
+
+set(CMAKE_DEBUG_TARGET_PROPERTIES AUTOUIC_OPTIONS)
+
+add_library(KI18n INTERFACE)
+set_property(TARGET KI18n APPEND PROPERTY
+  INTERFACE_AUTOUIC_OPTIONS -tr ki18n
+)
+
+add_library(OtherI18n INTERFACE)
+set_property(TARGET OtherI18n APPEND PROPERTY
+  INTERFACE_AUTOUIC_OPTIONS -tr otheri18n
+)
+
+add_library(LibWidget empty.cpp)
+target_link_libraries(LibWidget KI18n OtherI18n ${QT_GUI_TARGET})
diff --git a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake 
b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
index ff2fe8d..b87adc8 100644
--- a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
@@ -10,3 +10,8 @@ run_cmake(InterfaceString-mismatched-use)
 run_cmake(InterfaceString-builtin-prop)
 run_cmake(InterfaceString-Bool-Conflict)
 run_cmake(DebugProperties)
+
+if (QT_QMAKE_EXECUTABLE})
+  set(RunCMake_TEST_OPTIONS 
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
+  run_cmake(AutoUic)
+endif()
diff --git a/Tests/RunCMake/CompatibleInterface/empty.cpp 
b/Tests/RunCMake/CompatibleInterface/empty.cpp
new file mode 100644
index 0000000..0032329
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/empty.cpp
@@ -0,0 +1 @@
+// no content

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to