[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6056-gc974f9c

Stephen Kelly steveire at gmail.com
Thu Dec 5 08:06:14 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  c974f9c252be30b61659a2dbd9b96bff80016a9e (commit)
       via  3cda6c47f795281a4f1bb8d2c4c5b58d9ea7f901 (commit)
       via  6a8b855df090c8be94d885952f0ebc0af7de445d (commit)
       via  7974dbb0ffe9c4abb314ec6baff4f0af1d99e5f5 (commit)
      from  9245b5e072560f07e1b11c2341caeee386812086 (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=c974f9c252be30b61659a2dbd9b96bff80016a9e
commit c974f9c252be30b61659a2dbd9b96bff80016a9e
Merge: 9245b5e 3cda6c4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 5 08:05:55 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 5 08:05:55 2013 -0500

    Merge topic 'INTERFACE_AUTOUIC_OPTIONS' into next
    
    3cda6c4 cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.
    6a8b855 cmTarget: Report origin of COMPATIBLE_INTERFACE properties.
    7974dbb CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cda6c47f795281a4f1bb8d2c4c5b58d9ea7f901
commit 3cda6c47f795281a4f1bb8d2c4c5b58d9ea7f901
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Dec 3 13:26:51 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Dec 5 14:05:15 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..be6bb52 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;
@@ -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.cmake b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
new file mode 100644
index 0000000..32aa797
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
@@ -0,0 +1,18 @@
+
+find_package(Qt4 REQUIRED)
+
+set(QT_CORE_TARGET Qt4::QtCore)
+set(QT_GUI_TARGET Qt4::QtGui)
+
+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/AutoUicresult.txt b/Tests/RunCMake/CompatibleInterface/AutoUicresult.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/AutoUicresult.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/AutoUicstderr.txt b/Tests/RunCMake/CompatibleInterface/AutoUicstderr.txt
new file mode 100644
index 0000000..706f2ef
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/AutoUicstderr.txt
@@ -0,0 +1 @@
+sdsdsd
diff --git a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
index ff2fe8d..7a55c10 100644
--- a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
@@ -10,3 +10,7 @@ run_cmake(InterfaceString-mismatched-use)
 run_cmake(InterfaceString-builtin-prop)
 run_cmake(InterfaceString-Bool-Conflict)
 run_cmake(DebugProperties)
+
+set(RunCMake_TEST_OPTIONS -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
+
+run_cmake(AutoUic)
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

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a8b855df090c8be94d885952f0ebc0af7de445d
commit 6a8b855df090c8be94d885952f0ebc0af7de445d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 5 13:24:46 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Dec 5 14:05:15 2013 +0100

    cmTarget: Report origin of COMPATIBLE_INTERFACE properties.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index fe68a8a..ab9b157 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4423,6 +4423,93 @@ const char* impliedValue<const char*>(const char*)
   return "";
 }
 
+
+template<typename PropertyType>
+std::string valueAsString(PropertyType);
+template<>
+std::string valueAsString<bool>(bool value)
+{
+  return value ? "TRUE" : "FALSE";
+}
+template<>
+std::string valueAsString<const char*>(const char* value)
+{
+  return value ? value : "(unset)";
+}
+
+//----------------------------------------------------------------------------
+void
+cmTarget::ReportPropertyOrigin(const std::string &p,
+                               const std::string &result,
+                               const std::string &report,
+                               const std::string &compatibilityType) const
+{
+  std::vector<std::string> debugProperties;
+  const char *debugProp =
+          this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
+  if (debugProp)
+    {
+    cmSystemTools::ExpandListArgument(debugProp, debugProperties);
+    }
+
+  bool debugOrigin = !this->DebugCompatiblePropertiesDone[p]
+                    && std::find(debugProperties.begin(),
+                                 debugProperties.end(),
+                                 p)
+                        != debugProperties.end();
+
+  if (this->Makefile->IsGeneratingBuildSystem())
+    {
+    this->DebugCompatiblePropertiesDone[p] = true;
+    }
+  if (!debugOrigin)
+    {
+    return;
+    }
+
+  std::string areport = compatibilityType;
+  areport += std::string(" of property \"") + p + "\" for target \"";
+  areport += std::string(this->GetName());
+  areport += "\" (result: \"";
+  areport += result;
+  areport += "\"):\n" + report;
+
+  cmListFileBacktrace lfbt;
+  this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG, areport, lfbt);
+}
+
+//----------------------------------------------------------------------------
+std::string compatibilityType(CompatibleType t)
+{
+  switch(t)
+    {
+    case BoolType:
+      return "Boolean compatibility";
+    case StringType:
+      return "String compatibility";
+    case NumberMaxType:
+      return "Numeric maximum compatibility";
+    case NumberMinType:
+      return "Numeric minimum compatibility";
+    }
+  assert(!"Unreachable!");
+}
+
+//----------------------------------------------------------------------------
+std::string compatibilityAgree(CompatibleType t, bool dominant)
+{
+  switch(t)
+    {
+    case BoolType:
+    case StringType:
+      return "(Agree)\n";
+    case NumberMaxType:
+    case NumberMinType:
+      return dominant ? "(Dominant)\n" : "(Ignored)\n";
+    }
+  assert(!"Unreachable!");
+}
+
 //----------------------------------------------------------------------------
 template<typename PropertyType>
 PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
@@ -4450,6 +4537,23 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
   const cmComputeLinkInformation::ItemVector &deps = info->GetItems();
   bool propInitialized = explicitlySet;
 
+  std::string report = " * Target \"";
+  report += tgt->GetName();
+  if (explicitlySet)
+    {
+    report += "\" has property content \"";
+    report += valueAsString<PropertyType>(propContent);
+    report += "\"\n";
+    }
+  else if (impliedByUse)
+    {
+    report += "\" property is implied by use.\n";
+    }
+  else
+    {
+    report += "\" property not set.\n";
+    }
+
   for(cmComputeLinkInformation::ItemVector::const_iterator li =
       deps.begin();
       li != deps.end(); ++li)
@@ -4471,6 +4575,17 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
     PropertyType ifacePropContent =
                     getTypedProperty<PropertyType>(li->Target,
                               ("INTERFACE_" + p).c_str(), 0);
+
+    std::string reportEntry;
+    if (ifacePropContent)
+      {
+      reportEntry += " * Target \"";
+      reportEntry += li->Target->GetName();
+      reportEntry += "\" property value \"";
+      reportEntry += valueAsString<PropertyType>(ifacePropContent);
+      reportEntry += "\" ";
+      }
+
     if (explicitlySet)
       {
       if (ifaceIsSet)
@@ -4489,7 +4604,8 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
           }
         else
           {
-          // Agree
+          report += reportEntry;
+          report += compatibilityAgree(t, propContent != consistent);
           propContent = consistent;
           continue;
           }
@@ -4503,6 +4619,13 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
     else if (impliedByUse)
       {
       propContent = impliedValue<PropertyType>(propContent);
+
+      reportEntry += " * Target \"";
+      reportEntry += li->Target->GetName();
+      reportEntry += "\" property value \"";
+      reportEntry += valueAsString<PropertyType>(propContent);
+      reportEntry += "\" ";
+
       if (ifaceIsSet)
         {
         PropertyType consistent = consistentProperty(propContent,
@@ -4520,7 +4643,8 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
           }
         else
           {
-          // Agree
+          report += reportEntry;
+          report += compatibilityAgree(t, propContent != consistent);
           propContent = consistent;
           continue;
           }
@@ -4551,13 +4675,15 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
             }
           else
             {
-            // Agree.
+            report += reportEntry;
+            report += compatibilityAgree(t, propContent != consistent);
             propContent = consistent;
             continue;
             }
           }
         else
           {
+          report += reportEntry + "(Interface set)\n";
           propContent = ifacePropContent;
           propInitialized = true;
           }
@@ -4569,6 +4695,9 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
         }
       }
     }
+
+  tgt->ReportPropertyOrigin(p, valueAsString<PropertyType>(propContent),
+                            report, compatibilityType(t));
   return propContent;
 }
 
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 93e8b99..2f4be84 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -569,6 +569,11 @@ public:
   bool LinkLanguagePropagatesToDependents() const
   { return this->TargetTypeValue == STATIC_LIBRARY; }
 
+  void ReportPropertyOrigin(const std::string &p,
+                            const std::string &result,
+                            const std::string &report,
+                            const std::string &compatibilityType) const;
+
 private:
   bool HandleLocationPropertyPolicy() const;
 
@@ -691,6 +696,7 @@ private:
   bool IsApple;
   bool IsImportedTarget;
   mutable bool DebugIncludesDone;
+  mutable std::map<std::string, bool> DebugCompatiblePropertiesDone;
   mutable bool DebugCompileOptionsDone;
   mutable bool DebugAutoUicOptionsDone;
   mutable bool DebugCompileDefinitionsDone;
diff --git a/Tests/CompatibleInterface/CMakeLists.txt b/Tests/CompatibleInterface/CMakeLists.txt
index 8186c61..5e64d2a 100644
--- a/Tests/CompatibleInterface/CMakeLists.txt
+++ b/Tests/CompatibleInterface/CMakeLists.txt
@@ -31,6 +31,13 @@ set_property(TARGET iface1 APPEND PROPERTY
     NUMBER_MAX_PROP2
 )
 
+set(CMAKE_DEBUG_TARGET_PROPERTIES
+  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4
+  STRING_PROP1 STRING_PROP2 STRING_PROP3
+  NUMBER_MIN_PROP1 NUMBER_MIN_PROP2
+  NUMBER_MAX_PROP1 NUMBER_MAX_PROP2
+)
+
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP1 ON)
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP2 ON)
 set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP1 prop1)
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-result.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
new file mode 100644
index 0000000..0044564
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
@@ -0,0 +1,73 @@
+CMake Debug Log:
+  Boolean compatibility of property "BOOL_PROP1" for target
+  "CompatibleInterface" \(result: "TRUE"\):
+
+   \* Target "CompatibleInterface" property not set.
+   \* Target "iface1" property value "TRUE" \(Interface set\)
++
+CMake Debug Log:
+  Boolean compatibility of property "BOOL_PROP2" for target
+  "CompatibleInterface" \(result: "TRUE"\):
+
+   \* Target "CompatibleInterface" has property content "TRUE"
+   \* Target "iface1" property value "TRUE" \(Agree\)
++
+CMake Debug Log:
+  Boolean compatibility of property "BOOL_PROP3" for target
+  "CompatibleInterface" \(result: "TRUE"\):
+
+   \* Target "CompatibleInterface" has property content "TRUE"
++
+CMake Debug Log:
+  Boolean compatibility of property "BOOL_PROP4" for target
+  "CompatibleInterface" \(result: "FALSE"\):
+
+   \* Target "CompatibleInterface" property not set.
++
+CMake Debug Log:
+  String compatibility of property "STRING_PROP1" for target
+  "CompatibleInterface" \(result: "prop1"\):
+
+   \* Target "CompatibleInterface" property not set.
+   \* Target "iface1" property value "prop1" \(Interface set\)
++
+CMake Debug Log:
+  String compatibility of property "STRING_PROP2" for target
+  "CompatibleInterface" \(result: "prop2"\):
+
+   \* Target "CompatibleInterface" has property content "prop2"
+   \* Target "iface1" property value "prop2" \(Agree\)
++
+CMake Debug Log:
+  String compatibility of property "STRING_PROP3" for target
+  "CompatibleInterface" \(result: "prop3"\):
+
+   \* Target "CompatibleInterface" has property content "prop3"
++
+CMake Debug Log:
+  Numeric minimum compatibility of property "NUMBER_MIN_PROP1" for target
+  "CompatibleInterface" \(result: "50"\):
+
+   \* Target "CompatibleInterface" has property content "50"
+   \* Target "iface1" property value "100" \(Ignored\)
++
+CMake Debug Log:
+  Numeric minimum compatibility of property "NUMBER_MIN_PROP2" for target
+  "CompatibleInterface" \(result: "200"\):
+
+   \* Target "CompatibleInterface" has property content "250"
+   \* Target "iface1" property value "200" \(Dominant\)
++
+CMake Debug Log:
+  Numeric maximum compatibility of property "NUMBER_MAX_PROP1" for target
+  "CompatibleInterface" \(result: "100"\):
+
+   \* Target "CompatibleInterface" has property content "50"
+   \* Target "iface1" property value "100" \(Dominant\)
++
+CMake Debug Log:
+  Numeric maximum compatibility of property "NUMBER_MAX_PROP2" for target
+  "CompatibleInterface" \(result: "250"\):
+
+   \* Target "CompatibleInterface" has property content "250"
+   \* Target "iface1" property value "200" \(Ignored\)
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
new file mode 100644
index 0000000..3214d8e
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -0,0 +1,60 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(CompatibleInterface)
+
+include(GenerateExportHeader)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+add_library(iface1 INTERFACE)
+set_property(TARGET iface1 APPEND PROPERTY
+  COMPATIBLE_INTERFACE_BOOL
+    BOOL_PROP1
+    BOOL_PROP2
+    BOOL_PROP3
+    BOOL_PROP4
+)
+set_property(TARGET iface1 APPEND PROPERTY
+  COMPATIBLE_INTERFACE_STRING
+    STRING_PROP1
+    STRING_PROP2
+    STRING_PROP3
+)
+set_property(TARGET iface1 APPEND PROPERTY
+  COMPATIBLE_INTERFACE_NUMBER_MIN
+    NUMBER_MIN_PROP1
+    NUMBER_MIN_PROP2
+)
+set_property(TARGET iface1 APPEND PROPERTY
+  COMPATIBLE_INTERFACE_NUMBER_MAX
+    NUMBER_MAX_PROP1
+    NUMBER_MAX_PROP2
+)
+
+set(CMAKE_DEBUG_TARGET_PROPERTIES
+  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4
+  STRING_PROP1 STRING_PROP2 STRING_PROP3
+  NUMBER_MIN_PROP1 NUMBER_MIN_PROP2
+  NUMBER_MAX_PROP1 NUMBER_MAX_PROP2
+)
+
+set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP1 ON)
+set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP2 ON)
+set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP1 prop1)
+set_property(TARGET iface1 PROPERTY INTERFACE_STRING_PROP2 prop2)
+set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP1 100)
+set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MIN_PROP2 200)
+set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP1 100)
+set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP2 200)
+
+add_executable(CompatibleInterface empty.cpp)
+target_link_libraries(CompatibleInterface iface1)
+
+set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP2 ON)
+set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP3 ON)
+set_property(TARGET CompatibleInterface PROPERTY STRING_PROP2 prop2)
+set_property(TARGET CompatibleInterface PROPERTY STRING_PROP3 prop3)
+set_property(TARGET CompatibleInterface PROPERTY NUMBER_MIN_PROP1 50)
+set_property(TARGET CompatibleInterface PROPERTY NUMBER_MIN_PROP2 250)
+set_property(TARGET CompatibleInterface PROPERTY NUMBER_MAX_PROP1 50)
+set_property(TARGET CompatibleInterface PROPERTY NUMBER_MAX_PROP2 250)
diff --git a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
index 9768151..ff2fe8d 100644
--- a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
@@ -9,3 +9,4 @@ run_cmake(InterfaceString-mismatch-depend-self)
 run_cmake(InterfaceString-mismatched-use)
 run_cmake(InterfaceString-builtin-prop)
 run_cmake(InterfaceString-Bool-Conflict)
+run_cmake(DebugProperties)
diff --git a/Tests/RunCMake/PositionIndependentCode/Debug-result.txt b/Tests/RunCMake/PositionIndependentCode/Debug-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/PositionIndependentCode/Debug-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/PositionIndependentCode/Debug-stderr.txt b/Tests/RunCMake/PositionIndependentCode/Debug-stderr.txt
new file mode 100644
index 0000000..774445b
--- /dev/null
+++ b/Tests/RunCMake/PositionIndependentCode/Debug-stderr.txt
@@ -0,0 +1,6 @@
+CMake Debug Log:
+  Boolean compatibility of property "POSITION_INDEPENDENT_CODE" for target
+  "foo" \(result: "TRUE"\):
+
+   \* Target "foo" has property content "TRUE"
+   \* Target "iface" property value "TRUE" \(Agree\)
diff --git a/Tests/RunCMake/PositionIndependentCode/Debug.cmake b/Tests/RunCMake/PositionIndependentCode/Debug.cmake
new file mode 100644
index 0000000..4a8fbac
--- /dev/null
+++ b/Tests/RunCMake/PositionIndependentCode/Debug.cmake
@@ -0,0 +1,8 @@
+
+add_library(iface INTERFACE)
+set_property(TARGET iface PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE ON)
+
+set(CMAKE_DEBUG_TARGET_PROPERTIES POSITION_INDEPENDENT_CODE)
+add_library(foo main.cpp)
+target_link_libraries(foo iface)
+set_property(TARGET foo PROPERTY POSITION_INDEPENDENT_CODE ON)
diff --git a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
index 3a2009b..6a67e3c 100644
--- a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
@@ -6,3 +6,4 @@ run_cmake(Conflict3)
 run_cmake(Conflict4)
 run_cmake(Conflict5)
 run_cmake(Conflict6)
+run_cmake(Debug)

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

Summary of changes:
 Source/CMakeVersion.cmake                          |    2 +-
 Source/cmTarget.cxx                                |  290 ++++++++++----------
 Source/cmTarget.h                                  |    7 +-
 Tests/CompatibleInterface/CMakeLists.txt           |    7 +
 Tests/RunCMake/CMakeLists.txt                      |    3 +
 Tests/RunCMake/CompatibleInterface/AutoUic.cmake   |   18 ++
 .../AutoUicresult.txt}                             |    0
 .../RunCMake/CompatibleInterface/AutoUicstderr.txt |    1 +
 .../DebugProperties-result.txt}                    |    0
 .../CompatibleInterface/DebugProperties-stderr.txt |   73 +++++
 .../CompatibleInterface/DebugProperties.cmake      |   60 ++++
 .../CompatibleInterface/RunCMakeTest.cmake         |    5 +
 Tests/{ => RunCMake}/CompatibleInterface/empty.cpp |    0
 .../Debug-result.txt}                              |    0
 .../PositionIndependentCode/Debug-stderr.txt       |    6 +
 Tests/RunCMake/PositionIndependentCode/Debug.cmake |    8 +
 .../PositionIndependentCode/RunCMakeTest.cmake     |    1 +
 17 files changed, 340 insertions(+), 141 deletions(-)
 create mode 100644 Tests/RunCMake/CompatibleInterface/AutoUic.cmake
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CompatibleInterface/AutoUicresult.txt} (100%)
 create mode 100644 Tests/RunCMake/CompatibleInterface/AutoUicstderr.txt
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CompatibleInterface/DebugProperties-result.txt} (100%)
 create mode 100644 Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
 create mode 100644 Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
 copy Tests/{ => RunCMake}/CompatibleInterface/empty.cpp (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => PositionIndependentCode/Debug-result.txt} (100%)
 create mode 100644 Tests/RunCMake/PositionIndependentCode/Debug-stderr.txt
 create mode 100644 Tests/RunCMake/PositionIndependentCode/Debug.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list