[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6459-geb5214f

Stephen Kelly steveire at gmail.com
Mon Dec 30 14:33:12 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  eb5214fb43668b93afac2871b266f009b09205a2 (commit)
       via  47b9928f56a456a40704cb6e6c0079296ce8d757 (commit)
       via  4417316637401b37a41c690bc3cc15263be6d890 (commit)
       via  a73601a66197adbbffe4f5813a1619e84184bd1c (commit)
       via  44d1b40e154bb151159c5da594c3856bcaf8d460 (commit)
       via  8148890856d83a02a001908a0fd5728345c8d4d9 (commit)
       via  5fd22fa28c5317c967cf8770b42c9c28c7040797 (commit)
      from  3181627df255e4f4cee7d0e6f5c68fcde4868234 (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=eb5214fb43668b93afac2871b266f009b09205a2
commit eb5214fb43668b93afac2871b266f009b09205a2
Merge: 3181627 47b9928
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 30 14:33:07 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 30 14:33:07 2013 -0500

    Merge topic 'minor-cleanups' into next
    
    47b9928 Add cmHasLiteralSuffix API.
    4417316 cmTarget: Remove support for <CONFIG>_LOCATION property.
    a73601a cmTarget: Test impliedByUse number-compatible properties.
    44d1b40 cmTarget: Don't repeat property origin debug information.
    8148890 cmTarget: Fix debug report for interface-set compatibility types.
    5fd22fa cmTarget: Fix reporting interface-set properties which are FALSE.

diff --cc Source/cmTarget.cxx
index a9cd871,cf4a013..8e24e85
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@@ -4287,21 -4227,16 +4271,22 @@@ cmMinimum(const T& l, const T& r) {retu
  #endif
  
  //----------------------------------------------------------------------------
- const char * consistentNumberProperty(const char *lhs, const char *rhs,
-                                CompatibleType t)
+ std::pair<bool, const char*> consistentNumberProperty(const char *lhs,
+                                                       const char *rhs,
+                                                       CompatibleType t)
  {
 -  double lnum;
 -  double rnum;
 -  if(sscanf(lhs, "%lg", &lnum) != 1 ||
 -      sscanf(rhs, "%lg", &rnum) != 1)
 +  char *pEnd;
 +
 +  long lnum = strtol(lhs, &pEnd, 0);
 +  if (pEnd == lhs || *pEnd != '\0' || errno == ERANGE)
 +    {
 +    return 0;
 +    }
 +
 +  long rnum = strtol(rhs, &pEnd, 0);
 +  if (pEnd == rhs || *pEnd != '\0' || errno == ERANGE)
      {
-     return 0;
+     return std::pair<bool, const char*>(false, 0);
      }
  
    if (t == NumberMaxType)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47b9928f56a456a40704cb6e6c0079296ce8d757
commit 47b9928f56a456a40704cb6e6c0079296ce8d757
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 30 16:09:46 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 30 20:28:13 2013 +0100

    Add cmHasLiteralSuffix API.

diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 55c20d6..3329f8a 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1151,8 +1151,8 @@ void cmFindPackageCommand::AddPrefixesSystemEnvironment()
       std::string const& d = *i;
 
       // If the path is a PREFIX/bin case then add its parent instead.
-      if((d.size() >= 4 && strcmp(d.c_str()+d.size()-4, "/bin") == 0) ||
-         (d.size() >= 5 && strcmp(d.c_str()+d.size()-5, "/sbin") == 0))
+      if((d.size() >= 4 && cmHasLiteralSuffix(d, "/bin")) ||
+         (d.size() >= 5 && cmHasLiteralSuffix(d, "/sbin")))
         {
         this->AddPathInternal(cmSystemTools::GetFilenamePath(d), EnvPath);
         }
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index eb6e52f..783afe7 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -391,6 +391,20 @@ inline bool cmHasLiteralPrefixImpl(const char* str1,
   return strncmp(str1, str2, N) == 0;
 }
 
+inline bool cmHasLiteralSuffixImpl(const std::string &str1,
+                                   const char *str2,
+                                   size_t N)
+{
+  return strcmp(str1.c_str() + str1.size() - N, str2) == 0;
+}
+
+inline bool cmHasLiteralSuffixImpl(const char* str1,
+                                   const char* str2,
+                                   size_t N)
+{
+  return strcmp(str1 + strlen(str1) - N, str2) == 0;
+}
+
 #if defined(_MSC_VER) && _MSC_VER < 1300 \
   || defined(__GNUC__) && __GNUC__ < 3 \
   || defined(__BORLANDC__)
@@ -402,6 +416,9 @@ inline bool cmHasLiteralPrefixImpl(const char* str1,
 #define cmHasLiteralPrefix(STR1, STR2) \
   cmHasLiteralPrefixImpl(STR1, "" STR2 "", sizeof(STR2) - 1)
 
+#define cmHasLiteralSuffix(STR1, STR2) \
+  cmHasLiteralSuffixImpl(STR1, "" STR2 "", sizeof(STR2) - 1)
+
 #else
 
 template<typename T, size_t N>
@@ -417,6 +434,12 @@ bool cmHasLiteralPrefix(T str1, const char (&str2)[N])
   return cmHasLiteralPrefixImpl(str1, str2, N - 1);
 }
 
+template<typename T, size_t N>
+bool cmHasLiteralSuffix(T str1, const char (&str2)[N])
+{
+  return cmHasLiteralSuffixImpl(str1, str2, N - 1);
+}
+
 #endif
 
 struct cmStrCmp {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4417316637401b37a41c690bc3cc15263be6d890
commit 4417316637401b37a41c690bc3cc15263be6d890
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 30 13:16:22 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 30 13:19:20 2013 +0100

    cmTarget: Remove support for <CONFIG>_LOCATION property.
    
    It is not documented, is very old, is compatibility code,
    is non-uniform and is not needed.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index acad743..cf4a013 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2722,25 +2722,6 @@ const char *cmTarget::GetProperty(const char* prop,
                                    this->GetLocation(configName.c_str()),
                                    cmProperty::TARGET);
       }
-    else
-      {
-      // Support "<CONFIG>_LOCATION" for compatibility.
-      int len = static_cast<int>(strlen(prop));
-      if(len > 9 && strcmp(prop+len-9, "_LOCATION") == 0)
-        {
-        std::string configName(prop, len-9);
-        if(configName != "IMPORTED")
-          {
-          if (!this->HandleLocationPropertyPolicy())
-            {
-            return 0;
-            }
-          this->Properties.SetProperty(prop,
-                                       this->GetLocation(configName.c_str()),
-                                       cmProperty::TARGET);
-          }
-        }
-      }
     }
   if(strcmp(prop,"INCLUDE_DIRECTORIES") == 0)
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a73601a66197adbbffe4f5813a1619e84184bd1c
commit a73601a66197adbbffe4f5813a1619e84184bd1c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 30 11:37:34 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 30 11:43:22 2013 +0100

    cmTarget: Test impliedByUse number-compatible properties.
    
    Test that it is an error to read a number-compatible property to
    determine the link implementation.  An alternative would be to
    consider the value to be "0", however, that is too arbitrary
    given the use-cases of this feature.  Values from this feature may
    be used in setting a define, where "0" may have special or invalid
    meaning and should be explicit.

diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use-result.txt b/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use-stderr.txt b/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use-stderr.txt
new file mode 100644
index 0000000..723daec
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error: Property SOMEPROP on target "user" is
+implied to be empty because it was used to determine the link libraries
+already. The INTERFACE_SOMEPROP property on
+dependency "foo" is in conflict.
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use.cmake
new file mode 100644
index 0000000..a064d76
--- /dev/null
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceNumber-mismatched-use.cmake
@@ -0,0 +1,9 @@
+
+add_library(foo UNKNOWN IMPORTED)
+add_library(bar UNKNOWN IMPORTED)
+
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_NUMBER_MIN SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP 42)
+
+add_executable(user main.cpp)
+target_link_libraries(user foo $<$<STREQUAL:$<TARGET_PROPERTY:SOMEPROP>,42>:bar>)
diff --git a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
index ec52e5f..0b9729b 100644
--- a/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompatibleInterface/RunCMakeTest.cmake
@@ -7,6 +7,7 @@ run_cmake(InterfaceBool-builtin-prop)
 run_cmake(InterfaceString-mismatch-depends)
 run_cmake(InterfaceString-mismatch-depend-self)
 run_cmake(InterfaceString-mismatched-use)
+run_cmake(InterfaceNumber-mismatched-use)
 run_cmake(InterfaceString-builtin-prop)
 run_cmake(InterfaceString-Bool-Conflict)
 run_cmake(InterfaceString-Bool-Min-Conflict)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44d1b40e154bb151159c5da594c3856bcaf8d460
commit 44d1b40e154bb151159c5da594c3856bcaf8d460
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 30 10:45:08 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 30 11:43:22 2013 +0100

    cmTarget: Don't repeat property origin debug information.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 013136b..acad743 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4514,12 +4514,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
       {
       propContent = impliedValue<PropertyType>(propContent);
 
-      reportEntry += " * Target \"";
-      reportEntry += li->Target->GetName();
-      reportEntry += "\" property value \"";
-      reportEntry += valueAsString<PropertyType>(propContent);
-      reportEntry += "\" ";
-
       if (ifaceIsSet)
         {
         std::pair<bool, PropertyType> consistent =
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
index 253e246..e3efe28 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
@@ -40,6 +40,13 @@ CMake Debug Log:
    \* Target "iface2" property value "FALSE" \(Agree\)
 +
 CMake Debug Log:
+  Boolean compatibility of property "BOOL_PROP7" for target
+  "CompatibleInterface" \(result: "FALSE"\):
+
+   \* Target "CompatibleInterface" property is implied by use.
+   \* Target "iface1" property value "FALSE" \(Agree\)
++
+CMake Debug Log:
   String compatibility of property "STRING_PROP1" for target
   "CompatibleInterface" \(result: "prop1"\):
 
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 46838d7..42a3af2 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -15,6 +15,7 @@ set_property(TARGET iface1 APPEND PROPERTY
     BOOL_PROP4
     BOOL_PROP5
     BOOL_PROP6
+    BOOL_PROP7
 )
 set_property(TARGET iface1 APPEND PROPERTY
   COMPATIBLE_INTERFACE_STRING
@@ -34,7 +35,7 @@ set_property(TARGET iface1 APPEND PROPERTY
 )
 
 set(CMAKE_DEBUG_TARGET_PROPERTIES
-  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5 BOOL_PROP6
+  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5 BOOL_PROP6 BOOL_PROP7
   STRING_PROP1 STRING_PROP2 STRING_PROP3
   NUMBER_MIN_PROP1 NUMBER_MIN_PROP2
   NUMBER_MAX_PROP1 NUMBER_MAX_PROP2
@@ -44,6 +45,7 @@ set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP1 ON)
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP2 ON)
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP5 OFF)
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP6 OFF)
+set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP7 OFF)
 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)
@@ -54,8 +56,12 @@ set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP2 200)
 add_library(iface2 INTERFACE)
 set_property(TARGET iface2 PROPERTY INTERFACE_BOOL_PROP6 OFF)
 
+add_library(iface3 INTERFACE)
+
 add_executable(CompatibleInterface empty.cpp)
-target_link_libraries(CompatibleInterface iface1 iface2)
+target_link_libraries(CompatibleInterface iface1 iface2
+  $<$<BOOL:$<TARGET_PROPERTY:BOOL_PROP7>>:iface3>
+)
 
 set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP2 ON)
 set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP3 ON)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8148890856d83a02a001908a0fd5728345c8d4d9
commit 8148890856d83a02a001908a0fd5728345c8d4d9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 30 09:36:08 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 30 11:43:22 2013 +0100

    cmTarget: Fix debug report for interface-set compatibility types.
    
    If the dependent target sets the property to boolean false, ensure
    that that appears in the debug report.  Previously, the report
    output contained whether the property was consistent among dependencies,
    displaying 'TRUE', instead of the content of the property, which may
    be 'FALSE'.
    
    Return a std::pair from the consistentProperty method.  This makes
    it possible to make the return value for string types easier to
    reason about.  The return value of consistentProperty was previously
    set to an empty static string to emulate a 'true' value for the caller
    in commit 816b4a8a (cmTarget: Make consistentProperty
    return consistent content., 2013-10-22).  The pair makes the
    consistency result properly typed.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1e1aff5..013136b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4216,20 +4216,23 @@ enum CompatibleType
 
 //----------------------------------------------------------------------------
 template<typename PropertyType>
-PropertyType consistentProperty(PropertyType lhs, PropertyType rhs,
-                                CompatibleType t);
+std::pair<bool, PropertyType> consistentProperty(PropertyType lhs,
+                                                 PropertyType rhs,
+                                                 CompatibleType t);
 
 //----------------------------------------------------------------------------
 template<>
-bool consistentProperty(bool lhs, bool rhs, CompatibleType)
+std::pair<bool, bool> consistentProperty(bool lhs, bool rhs, CompatibleType)
 {
-  return lhs == rhs;
+  return std::make_pair(lhs == rhs, lhs);
 }
 
 //----------------------------------------------------------------------------
-const char * consistentStringProperty(const char *lhs, const char *rhs)
+std::pair<bool, const char*> consistentStringProperty(const char *lhs,
+                                                      const char *rhs)
 {
-  return strcmp(lhs, rhs) == 0 ? lhs : 0;
+  const bool b = strcmp(lhs, rhs) == 0;
+  return std::make_pair(b, b ? lhs : 0);
 }
 
 #if defined(_MSC_VER) && _MSC_VER <= 1200
@@ -4243,49 +4246,51 @@ cmMinimum(const T& l, const T& r) {return l < r ? l : r;}
 #endif
 
 //----------------------------------------------------------------------------
-const char * consistentNumberProperty(const char *lhs, const char *rhs,
-                               CompatibleType t)
+std::pair<bool, const char*> consistentNumberProperty(const char *lhs,
+                                                      const char *rhs,
+                                                      CompatibleType t)
 {
   double lnum;
   double rnum;
   if(sscanf(lhs, "%lg", &lnum) != 1 ||
       sscanf(rhs, "%lg", &rnum) != 1)
     {
-    return 0;
+    return std::pair<bool, const char*>(false, 0);
     }
 
   if (t == NumberMaxType)
     {
-    return cmMaximum(lnum, rnum) == lnum ? lhs : rhs;
+    return std::make_pair(true, cmMaximum(lnum, rnum) == lnum ? lhs : rhs);
     }
   else
     {
-    return cmMinimum(lnum, rnum) == lnum ? lhs : rhs;
+    return std::make_pair(true, cmMinimum(lnum, rnum) == lnum ? lhs : rhs);
     }
 }
 
 //----------------------------------------------------------------------------
 template<>
-const char* consistentProperty(const char *lhs, const char *rhs,
-                               CompatibleType t)
+std::pair<bool, const char*> consistentProperty(const char *lhs,
+                                                const char *rhs,
+                                                CompatibleType t)
 {
   if (!lhs && !rhs)
     {
-    return "";
+    return std::make_pair(true, lhs);
     }
   if (!lhs)
     {
-    return rhs ? rhs : "";
+    return std::make_pair(true, rhs);
     }
   if (!rhs)
     {
-    return lhs ? lhs : "";
+    return std::make_pair(true, lhs);
     }
   switch(t)
   {
   case BoolType:
     assert(!"consistentProperty for strings called with BoolType");
-    return 0;
+    return std::pair<bool, const char*>(false, 0);
   case StringType:
     return consistentStringProperty(lhs, rhs);
   case NumberMinType:
@@ -4293,7 +4298,7 @@ const char* consistentProperty(const char *lhs, const char *rhs,
     return consistentNumberProperty(lhs, rhs, t);
   }
   assert(!"Unreachable!");
-  return 0;
+  return std::pair<bool, const char*>(false, 0);
 }
 
 template<typename PropertyType>
@@ -4478,11 +4483,12 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
       {
       if (ifaceIsSet)
         {
-        PropertyType consistent = consistentProperty(propContent,
+        std::pair<bool, PropertyType> consistent =
+                                  consistentProperty(propContent,
                                                      ifacePropContent, t);
         report += reportEntry;
-        report += compatibilityAgree(t, propContent != consistent);
-        if (!consistent)
+        report += compatibilityAgree(t, propContent != consistent.second);
+        if (!consistent.first)
           {
           cmOStringStream e;
           e << "Property " << p << " on target \""
@@ -4494,7 +4500,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
           }
         else
           {
-          propContent = consistent;
+          propContent = consistent.second;
           continue;
           }
         }
@@ -4516,11 +4522,12 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
 
       if (ifaceIsSet)
         {
-        PropertyType consistent = consistentProperty(propContent,
+        std::pair<bool, PropertyType> consistent =
+                                  consistentProperty(propContent,
                                                      ifacePropContent, t);
         report += reportEntry;
-        report += compatibilityAgree(t, propContent != consistent);
-        if (!consistent)
+        report += compatibilityAgree(t, propContent != consistent.second);
+        if (!consistent.first)
           {
           cmOStringStream e;
           e << "Property " << p << " on target \""
@@ -4533,7 +4540,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
           }
         else
           {
-          propContent = consistent;
+          propContent = consistent.second;
           continue;
           }
         }
@@ -4549,11 +4556,12 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
         {
         if (propInitialized)
           {
-          PropertyType consistent = consistentProperty(propContent,
+          std::pair<bool, PropertyType> consistent =
+                                    consistentProperty(propContent,
                                                        ifacePropContent, t);
           report += reportEntry;
-          report += compatibilityAgree(t, propContent != consistent);
-          if (!consistent)
+          report += compatibilityAgree(t, propContent != consistent.second);
+          if (!consistent.first)
             {
             cmOStringStream e;
             e << "The INTERFACE_" << p << " property of \""
@@ -4565,7 +4573,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
             }
           else
             {
-            propContent = consistent;
+            propContent = consistent.second;
             continue;
             }
           }
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
index 3027266..253e246 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
@@ -32,6 +32,14 @@ CMake Debug Log:
    \* Target "iface1" property value "FALSE" \(Interface set\)
 +
 CMake Debug Log:
+  Boolean compatibility of property "BOOL_PROP6" for target
+  "CompatibleInterface" \(result: "FALSE"\):
+
+   \* Target "CompatibleInterface" property not set.
+   \* Target "iface1" property value "FALSE" \(Interface set\)
+   \* Target "iface2" property value "FALSE" \(Agree\)
++
+CMake Debug Log:
   String compatibility of property "STRING_PROP1" for target
   "CompatibleInterface" \(result: "prop1"\):
 
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 24ffd5f..46838d7 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -14,6 +14,7 @@ set_property(TARGET iface1 APPEND PROPERTY
     BOOL_PROP3
     BOOL_PROP4
     BOOL_PROP5
+    BOOL_PROP6
 )
 set_property(TARGET iface1 APPEND PROPERTY
   COMPATIBLE_INTERFACE_STRING
@@ -33,7 +34,7 @@ set_property(TARGET iface1 APPEND PROPERTY
 )
 
 set(CMAKE_DEBUG_TARGET_PROPERTIES
-  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5
+  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5 BOOL_PROP6
   STRING_PROP1 STRING_PROP2 STRING_PROP3
   NUMBER_MIN_PROP1 NUMBER_MIN_PROP2
   NUMBER_MAX_PROP1 NUMBER_MAX_PROP2
@@ -42,6 +43,7 @@ set(CMAKE_DEBUG_TARGET_PROPERTIES
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP1 ON)
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP2 ON)
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP5 OFF)
+set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP6 OFF)
 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)
@@ -49,8 +51,11 @@ 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_library(iface2 INTERFACE)
+set_property(TARGET iface2 PROPERTY INTERFACE_BOOL_PROP6 OFF)
+
 add_executable(CompatibleInterface empty.cpp)
-target_link_libraries(CompatibleInterface iface1)
+target_link_libraries(CompatibleInterface iface1 iface2)
 
 set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP2 ON)
 set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP3 ON)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fd22fa28c5317c967cf8770b42c9c28c7040797
commit 5fd22fa28c5317c967cf8770b42c9c28c7040797
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 30 11:13:04 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 30 11:16:21 2013 +0100

    cmTarget: Fix reporting interface-set properties which are FALSE.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b89cfcf..1e1aff5 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4465,7 +4465,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
                               ("INTERFACE_" + p).c_str(), 0);
 
     std::string reportEntry;
-    if (ifacePropContent)
+    if (ifaceIsSet)
       {
       reportEntry += " * Target \"";
       reportEntry += li->Target->GetName();
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
index 0044564..3027266 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
@@ -25,6 +25,13 @@ CMake Debug Log:
    \* Target "CompatibleInterface" property not set.
 +
 CMake Debug Log:
+  Boolean compatibility of property "BOOL_PROP5" for target
+  "CompatibleInterface" \(result: "FALSE"\):
+
+   \* Target "CompatibleInterface" property not set.
+   \* Target "iface1" property value "FALSE" \(Interface set\)
++
+CMake Debug Log:
   String compatibility of property "STRING_PROP1" for target
   "CompatibleInterface" \(result: "prop1"\):
 
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 3214d8e..24ffd5f 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -13,6 +13,7 @@ set_property(TARGET iface1 APPEND PROPERTY
     BOOL_PROP2
     BOOL_PROP3
     BOOL_PROP4
+    BOOL_PROP5
 )
 set_property(TARGET iface1 APPEND PROPERTY
   COMPATIBLE_INTERFACE_STRING
@@ -32,7 +33,7 @@ set_property(TARGET iface1 APPEND PROPERTY
 )
 
 set(CMAKE_DEBUG_TARGET_PROPERTIES
-  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4
+  BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5
   STRING_PROP1 STRING_PROP2 STRING_PROP3
   NUMBER_MIN_PROP1 NUMBER_MIN_PROP2
   NUMBER_MAX_PROP1 NUMBER_MAX_PROP2
@@ -40,6 +41,7 @@ set(CMAKE_DEBUG_TARGET_PROPERTIES
 
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP1 ON)
 set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP2 ON)
+set_property(TARGET iface1 PROPERTY INTERFACE_BOOL_PROP5 OFF)
 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)

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

Summary of changes:
 Source/cmFindPackageCommand.cxx                    |    4 +-
 Source/cmStandardIncludes.h                        |   23 +++++
 Source/cmTarget.cxx                                |   95 ++++++++------------
 .../CompatibleInterface/DebugProperties-stderr.txt |   22 +++++
 .../CompatibleInterface/DebugProperties.cmake      |   17 +++-
 .../InterfaceNumber-mismatched-use-result.txt}     |    0
 ...t => InterfaceNumber-mismatched-use-stderr.txt} |    0
 ....cmake => InterfaceNumber-mismatched-use.cmake} |    6 +-
 .../CompatibleInterface/RunCMakeTest.cmake         |    1 +
 9 files changed, 105 insertions(+), 63 deletions(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CompatibleInterface/InterfaceNumber-mismatched-use-result.txt} (100%)
 copy Tests/RunCMake/CompatibleInterface/{InterfaceString-mismatched-use-stderr.txt => InterfaceNumber-mismatched-use-stderr.txt} (100%)
 copy Tests/RunCMake/CompatibleInterface/{InterfaceString-mismatched-use.cmake => InterfaceNumber-mismatched-use.cmake} (51%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list