[Cmake-commits] CMake branch, next, updated. v2.8.12-4340-gd8eebde

Stephen Kelly steveire at gmail.com
Wed Oct 23 09:29:55 EDT 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  d8eebdee8f3e2fb364ec470fcab9f7354017bb5d (commit)
       via  d4af47545516dd4a00be225b7752aa9bfe0e5ded (commit)
      from  6ea1c7d3e94e14ea362d87add9b71f1a0099673b (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=d8eebdee8f3e2fb364ec470fcab9f7354017bb5d
commit d8eebdee8f3e2fb364ec470fcab9f7354017bb5d
Merge: 6ea1c7d d4af475
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 23 09:29:49 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 23 09:29:49 2013 -0400

    Merge topic 'compatible-interface-numbers' into next
    
    d4af475 Revert topic

diff --cc Source/cmGeneratorExpressionEvaluator.cxx
index f92c18e,dfd995e..33863f4
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@@ -1004,32 -995,9 +984,8 @@@ static const struct TargetPropertyNode 
        return linkedTargetsContent;
        }
  
-     if (!target->IsImported()
-         && dagCheckerParent && !dagCheckerParent->EvaluatingLinkLibraries())
-       {
-       if (target->IsLinkInterfaceDependentNumberMinProperty(propertyName,
-                                                         context->Config))
-         {
-         context->HadContextSensitiveCondition = true;
-         const char *propContent =
-                             target->GetLinkInterfaceDependentNumberMinProperty(
-                                                 propertyName,
-                                                 context->Config);
-         return propContent ? propContent : "";
-         }
-       if (target->IsLinkInterfaceDependentNumberMaxProperty(propertyName,
-                                                         context->Config))
-         {
-         context->HadContextSensitiveCondition = true;
-         const char *propContent =
-                             target->GetLinkInterfaceDependentNumberMaxProperty(
-                                                 propertyName,
-                                                 context->Config);
-         return propContent ? propContent : "";
-         }
-       }
      for (size_t i = 1;
 -         i < (sizeof(targetPropertyTransitiveWhitelist) /
 -              sizeof(*targetPropertyTransitiveWhitelist));
 +         i < cmArraySize(targetPropertyTransitiveWhitelist);
           ++i)
        {
        if (targetPropertyTransitiveWhitelist[i] == interfacePropertyName)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4af47545516dd4a00be225b7752aa9bfe0e5ded
commit d4af47545516dd4a00be225b7752aa9bfe0e5ded
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 23 15:25:28 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Oct 23 15:26:55 2013 +0200

    Revert topic

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 658da20..bb3acff 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -76,8 +76,6 @@ Properties on Targets
    /prop_tgt/BUNDLE_EXTENSION
    /prop_tgt/BUNDLE
    /prop_tgt/COMPATIBLE_INTERFACE_BOOL
-   /prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX
-   /prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN
    /prop_tgt/COMPATIBLE_INTERFACE_STRING
    /prop_tgt/COMPILE_DEFINITIONS_CONFIG
    /prop_tgt/COMPILE_DEFINITIONS
diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst
index 83c18f1..7f95ef0 100644
--- a/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst
+++ b/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst
@@ -14,6 +14,4 @@ property is set, then it must have the same boolean value as all
 others, and if the property is not set, then it is ignored.  Note that
 for each dependee, the set of properties from this property must not
 intersect with the set of properties from the
-:prop_tgt:`COMPATIBLE_INTERFACE_STRING`,
-:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MIN` or
-:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MAX` property.
+COMPATIBLE_INTERFACE_STRING property.
diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst
deleted file mode 100644
index 2fe748e..0000000
--- a/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-COMPATIBLE_INTERFACE_NUMBER_MAX
--------------------------------
-
-Properties whose maximum value from the link interface will be used.
-
-The COMPATIBLE_INTERFACE_NUMBER_MAX property may contain a list of
-properties for this target whose maximum value may be read at generate time
-when evaluated in the INTERFACE of all linked dependees.  For example, if a
-property "FOO" appears in the list, then for each dependee, the
-"INTERFACE_FOO" property content in all of its dependencies will be compared
-with each other and with the "FOO" property in the depender.  When reading
-the FOO property at generate time, the maximum value will be returned.
-If the property is not set, then it is ignored.  Note that for each
-dependee, the set of properties from this property must not intersect
-with the set of properties from the :prop_tgt:`COMPATIBLE_INTERFACE_BOOL`,
-:prop_tgt:`COMPATIBLE_INTERFACE_STRING` or
-:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MIN` property.
diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst
deleted file mode 100644
index 7fe384b..0000000
--- a/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-COMPATIBLE_INTERFACE_NUMBER_MIN
--------------------------------
-
-Properties whose maximum value from the link interface will be used.
-
-The COMPATIBLE_INTERFACE_NUMBER_MIN property may contain a list of
-properties for this target whose minimum value may be read at generate time
-when evaluated in the INTERFACE of all linked dependees.  For example, if a
-property "FOO" appears in the list, then for each dependee, the
-"INTERFACE_FOO" property content in all of its dependencies will be compared
-with each other and with the "FOO" property in the depender.  When reading
-the FOO property at generate time, the minimum value will be returned.
-If the property is not set, then it is ignored.  Note that for each
-dependee, the set of properties from this property must not intersect
-with the set of properties from the :prop_tgt:`COMPATIBLE_INTERFACE_BOOL`,
-:prop_tgt:`COMPATIBLE_INTERFACE_STRING` or
-:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MAX` property.
diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst
index f3fb43d..a461f76 100644
--- a/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst
+++ b/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst
@@ -11,6 +11,5 @@ property "FOO" appears in the list, then for each dependee, the
 equal with each other, and with the "FOO" property in the dependee.
 If the property is not set, then it is ignored.  Note that for each
 dependee, the set of properties from this property must not intersect
-with the set of properties from the :prop_tgt:`COMPATIBLE_INTERFACE_BOOL`,
-:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MIN` or
-:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MAX` property.
+with the set of properties from the COMPATIBLE_INTERFACE_BOOL
+property.
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 65f1cc6..b01e499 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -411,12 +411,6 @@ void getCompatibleInterfaceProperties(cmTarget *target,
     getPropertyContents(li->Target,
                         "COMPATIBLE_INTERFACE_STRING",
                         ifaceProperties);
-    getPropertyContents(li->Target,
-                        "COMPATIBLE_INTERFACE_NUMBER_MIN",
-                        ifaceProperties);
-    getPropertyContents(li->Target,
-                        "COMPATIBLE_INTERFACE_NUMBER_MAX",
-                        ifaceProperties);
     }
 }
 
@@ -429,19 +423,11 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
                                 target, properties);
   this->PopulateInterfaceProperty("COMPATIBLE_INTERFACE_STRING",
                                 target, properties);
-  this->PopulateInterfaceProperty("COMPATIBLE_INTERFACE_NUMBER_MIN",
-                                target, properties);
-  this->PopulateInterfaceProperty("COMPATIBLE_INTERFACE_NUMBER_MAX",
-                                target, properties);
 
   std::set<std::string> ifaceProperties;
 
   getPropertyContents(target, "COMPATIBLE_INTERFACE_BOOL", ifaceProperties);
   getPropertyContents(target, "COMPATIBLE_INTERFACE_STRING", ifaceProperties);
-  getPropertyContents(target, "COMPATIBLE_INTERFACE_NUMBER_MIN",
-                      ifaceProperties);
-  getPropertyContents(target, "COMPATIBLE_INTERFACE_NUMBER_MAX",
-                      ifaceProperties);
 
   getCompatibleInterfaceProperties(target, ifaceProperties, 0);
 
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 10aed62..dfd995e 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -991,54 +991,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
                                                 context->Config);
         return propContent ? propContent : "";
         }
-      if (target->IsLinkInterfaceDependentNumberMinProperty(propertyName,
-                                                         context->Config))
-        {
-        context->HadContextSensitiveCondition = true;
-        const char *propContent =
-                          target->GetLinkInterfaceDependentNumberMinProperty(
-                                                propertyName,
-                                                context->Config);
-        return propContent ? propContent : "";
-        }
-      if (target->IsLinkInterfaceDependentNumberMaxProperty(propertyName,
-                                                         context->Config))
-        {
-        context->HadContextSensitiveCondition = true;
-        const char *propContent =
-                          target->GetLinkInterfaceDependentNumberMaxProperty(
-                                                propertyName,
-                                                context->Config);
-        return propContent ? propContent : "";
-        }
 
       return linkedTargetsContent;
       }
 
-    if (!target->IsImported()
-        && dagCheckerParent && !dagCheckerParent->EvaluatingLinkLibraries())
-      {
-      if (target->IsLinkInterfaceDependentNumberMinProperty(propertyName,
-                                                        context->Config))
-        {
-        context->HadContextSensitiveCondition = true;
-        const char *propContent =
-                            target->GetLinkInterfaceDependentNumberMinProperty(
-                                                propertyName,
-                                                context->Config);
-        return propContent ? propContent : "";
-        }
-      if (target->IsLinkInterfaceDependentNumberMaxProperty(propertyName,
-                                                        context->Config))
-        {
-        context->HadContextSensitiveCondition = true;
-        const char *propContent =
-                            target->GetLinkInterfaceDependentNumberMaxProperty(
-                                                propertyName,
-                                                context->Config);
-        return propContent ? propContent : "";
-        }
-      }
     for (size_t i = 1;
          i < (sizeof(targetPropertyTransitiveWhitelist) /
               sizeof(*targetPropertyTransitiveWhitelist));
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 179a15f..126cdbd 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4450,97 +4450,26 @@ const char *getTypedProperty<const char *>(cmTarget *tgt, const char *prop,
   return tgt->GetProperty(prop);
 }
 
-enum CompatibleType
-{
-  BoolType,
-  StringType,
-  NumberMinType,
-  NumberMaxType
-};
-
 //----------------------------------------------------------------------------
 template<typename PropertyType>
-PropertyType consistentProperty(PropertyType lhs, PropertyType rhs,
-                                CompatibleType t);
+bool consistentProperty(PropertyType lhs, PropertyType rhs);
 
 //----------------------------------------------------------------------------
 template<>
-bool consistentProperty(bool lhs, bool rhs, CompatibleType)
+bool consistentProperty(bool lhs, bool rhs)
 {
   return lhs == rhs;
 }
 
 //----------------------------------------------------------------------------
-const char * consistentStringProperty(const char *lhs, const char *rhs)
-{
-  return strcmp(lhs, rhs) == 0 ? lhs : 0;
-}
-
-//----------------------------------------------------------------------------
-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;
-    }
-
-  if (t == NumberMaxType)
-    {
-    return std::max(lnum, rnum) == lnum ? lhs : rhs;
-    }
-  else
-    {
-    return std::min(lnum, rnum) == lnum ? lhs : rhs;
-    }
-}
-
-//----------------------------------------------------------------------------
 template<>
-const char* consistentProperty(const char *lhs, const char *rhs,
-                               CompatibleType t)
+bool consistentProperty(const char *lhs, const char *rhs)
 {
   if (!lhs && !rhs)
-    {
-    return "";
-    }
-  if (!lhs)
-    {
-    return rhs ? rhs : "";
-    }
-  if (!rhs)
-    {
-    return lhs ? lhs : "";
-    }
-  switch(t)
-  {
-  case BoolType:
-    assert(!"consistentProperty for strings called with BoolType");
-    return 0;
-  case StringType:
-    return consistentStringProperty(lhs, rhs);
-  case NumberMinType:
-  case NumberMaxType:
-    return consistentNumberProperty(lhs, rhs, t);
-  }
-  assert(!"Unreachable!");
-  return 0;
-}
-
-template<typename PropertyType>
-PropertyType impliedValue();
-template<>
-bool impliedValue<bool>()
-{
-  return false;
-}
-template<>
-const char* impliedValue<const char*>()
-{
-  return "";
+    return true;
+  if (!lhs || !rhs)
+    return false;
+  return strcmp(lhs, rhs) == 0;
 }
 
 //----------------------------------------------------------------------------
@@ -4549,7 +4478,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
                                           const std::string &p,
                                           const char *config,
                                           const char *defaultValue,
-                                          CompatibleType t,
                                           PropertyType *)
 {
   PropertyType propContent = getTypedProperty<PropertyType>(tgt, p.c_str(),
@@ -4595,9 +4523,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
       {
       if (ifaceIsSet)
         {
-        PropertyType consistent = consistentProperty(propContent,
-                                                     ifacePropContent, t);
-        if (!consistent)
+        if (!consistentProperty(propContent, ifacePropContent))
           {
           cmOStringStream e;
           e << "Property " << p << " on target \""
@@ -4610,7 +4536,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
         else
           {
           // Agree
-          propContent = consistent;
           continue;
           }
         }
@@ -4622,12 +4547,9 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
       }
     else if (impliedByUse)
       {
-      propContent = impliedValue<PropertyType>();
       if (ifaceIsSet)
         {
-        PropertyType consistent = consistentProperty(propContent,
-                                                     ifacePropContent, t);
-        if (!consistent)
+        if (!consistentProperty(propContent, ifacePropContent))
           {
           cmOStringStream e;
           e << "Property " << p << " on target \""
@@ -4641,7 +4563,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
         else
           {
           // Agree
-          propContent = consistent;
           continue;
           }
         }
@@ -4657,9 +4578,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
         {
         if (propInitialized)
           {
-          PropertyType consistent = consistentProperty(propContent,
-                                                       ifacePropContent, t);
-          if (!consistent)
+          if (!consistentProperty(propContent, ifacePropContent))
             {
             cmOStringStream e;
             e << "The INTERFACE_" << p << " property of \""
@@ -4672,7 +4591,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
           else
             {
             // Agree.
-            propContent = consistent;
             continue;
             }
           }
@@ -4697,7 +4615,7 @@ bool cmTarget::GetLinkInterfaceDependentBoolProperty(const std::string &p,
                                                      const char *config)
 {
   return checkInterfacePropertyCompatibility<bool>(this, p, config, "FALSE",
-                                                   BoolType, 0);
+                                                   0);
 }
 
 //----------------------------------------------------------------------------
@@ -4708,32 +4626,7 @@ const char * cmTarget::GetLinkInterfaceDependentStringProperty(
   return checkInterfacePropertyCompatibility<const char *>(this,
                                                            p,
                                                            config,
-                                                           "empty",
-                                                           StringType, 0);
-}
-
-//----------------------------------------------------------------------------
-const char * cmTarget::GetLinkInterfaceDependentNumberMinProperty(
-                                                      const std::string &p,
-                                                      const char *config)
-{
-  return checkInterfacePropertyCompatibility<const char *>(this,
-                                                           p,
-                                                           config,
-                                                           "empty",
-                                                           NumberMinType, 0);
-}
-
-//----------------------------------------------------------------------------
-const char * cmTarget::GetLinkInterfaceDependentNumberMaxProperty(
-                                                      const std::string &p,
-                                                      const char *config)
-{
-  return checkInterfacePropertyCompatibility<const char *>(this,
-                                                           p,
-                                                           config,
-                                                           "empty",
-                                                           NumberMaxType, 0);
+                                                           "empty", 0);
 }
 
 //----------------------------------------------------------------------------
@@ -4805,30 +4698,6 @@ bool cmTarget::IsLinkInterfaceDependentStringProperty(const std::string &p,
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::IsLinkInterfaceDependentNumberMinProperty(const std::string &p,
-                                    const char *config)
-{
-  if (this->TargetTypeValue == OBJECT_LIBRARY)
-    {
-    return false;
-    }
-  return isLinkDependentProperty(this, p, "COMPATIBLE_INTERFACE_NUMBER_MIN",
-                                 config);
-}
-
-//----------------------------------------------------------------------------
-bool cmTarget::IsLinkInterfaceDependentNumberMaxProperty(const std::string &p,
-                                    const char *config)
-{
-  if (this->TargetTypeValue == OBJECT_LIBRARY)
-    {
-    return false;
-    }
-  return isLinkDependentProperty(this, p, "COMPATIBLE_INTERFACE_NUMBER_MAX",
-                                 config);
-}
-
-//----------------------------------------------------------------------------
 void cmTarget::GetLanguages(std::set<cmStdString>& languages) const
 {
   for(std::vector<cmSourceFile*>::const_iterator
@@ -5783,39 +5652,23 @@ template<typename PropertyType>
 PropertyType getLinkInterfaceDependentProperty(cmTarget *tgt,
                                                const std::string prop,
                                                const char *config,
-                                               CompatibleType,
                                                PropertyType *);
 
 template<>
 bool getLinkInterfaceDependentProperty(cmTarget *tgt,
-                                       const std::string prop,
-                                       const char *config,
-                                       CompatibleType, bool *)
+                                         const std::string prop,
+                                         const char *config, bool *)
 {
   return tgt->GetLinkInterfaceDependentBoolProperty(prop, config);
 }
 
 template<>
 const char * getLinkInterfaceDependentProperty(cmTarget *tgt,
-                                               const std::string prop,
-                                               const char *config,
-                                               CompatibleType t,
-                                               const char **)
+                                                 const std::string prop,
+                                                 const char *config,
+                                                 const char **)
 {
-  switch(t)
-  {
-  case BoolType:
-    assert(!"String compatibility check function called for boolean");
-    return 0;
-  case StringType:
-    return tgt->GetLinkInterfaceDependentStringProperty(prop, config);
-  case NumberMinType:
-    return tgt->GetLinkInterfaceDependentNumberMinProperty(prop, config);
-  case NumberMaxType:
-    return tgt->GetLinkInterfaceDependentNumberMaxProperty(prop, config);
-  }
-  assert(!"Unreachable!");
-  return 0;
+  return tgt->GetLinkInterfaceDependentStringProperty(prop, config);
 }
 
 //----------------------------------------------------------------------------
@@ -5824,7 +5677,6 @@ void checkPropertyConsistency(cmTarget *depender, cmTarget *dependee,
                               const char *propName,
                               std::set<cmStdString> &emitted,
                               const char *config,
-                              CompatibleType t,
                               PropertyType *)
 {
   const char *prop = dependee->GetProperty(propName);
@@ -5857,7 +5709,7 @@ void checkPropertyConsistency(cmTarget *depender, cmTarget *dependee,
     if(emitted.insert(*pi).second)
       {
       getLinkInterfaceDependentProperty<PropertyType>(depender, *pi, config,
-                                                      t, 0);
+                                                      0);
       if (cmSystemTools::GetErrorOccuredFlag())
         {
         return;
@@ -5866,50 +5718,6 @@ void checkPropertyConsistency(cmTarget *depender, cmTarget *dependee,
     }
 }
 
-static cmStdString intersect(const std::set<cmStdString> &s1,
-                             const std::set<cmStdString> &s2)
-{
-  std::set<cmStdString> intersect;
-  std::set_intersection(s1.begin(),s1.end(),
-                        s2.begin(),s2.end(),
-                      std::inserter(intersect,intersect.begin()));
-  if (!intersect.empty())
-    {
-    return *intersect.begin();
-    }
-  return "";
-}
-static cmStdString intersect(const std::set<cmStdString> &s1,
-                       const std::set<cmStdString> &s2,
-                       const std::set<cmStdString> &s3)
-{
-  cmStdString result;
-  result = intersect(s1, s2);
-  if (!result.empty())
-    return result;
-  result = intersect(s1, s3);
-  if (!result.empty())
-    return result;
-  return intersect(s2, s3);
-}
-static cmStdString intersect(const std::set<cmStdString> &s1,
-                       const std::set<cmStdString> &s2,
-                       const std::set<cmStdString> &s3,
-                       const std::set<cmStdString> &s4)
-{
-  cmStdString result;
-  result = intersect(s1, s2);
-  if (!result.empty())
-    return result;
-  result = intersect(s1, s3);
-  if (!result.empty())
-    return result;
-  result = intersect(s1, s4);
-  if (!result.empty())
-    return result;
-  return intersect(s2, s3, s4);
-}
-
 //----------------------------------------------------------------------------
 void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info,
                                           const char* config)
@@ -5918,8 +5726,6 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info,
 
   std::set<cmStdString> emittedBools;
   std::set<cmStdString> emittedStrings;
-  std::set<cmStdString> emittedMinNumbers;
-  std::set<cmStdString> emittedMaxNumbers;
 
   for(cmComputeLinkInformation::ItemVector::const_iterator li =
       deps.begin();
@@ -5932,84 +5738,35 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info,
 
     checkPropertyConsistency<bool>(this, li->Target,
                                    "COMPATIBLE_INTERFACE_BOOL",
-                                   emittedBools, config, BoolType, 0);
+                                   emittedBools, config, 0);
     if (cmSystemTools::GetErrorOccuredFlag())
       {
       return;
       }
     checkPropertyConsistency<const char *>(this, li->Target,
                                            "COMPATIBLE_INTERFACE_STRING",
-                                           emittedStrings, config,
-                                           StringType, 0);
-    if (cmSystemTools::GetErrorOccuredFlag())
-      {
-      return;
-      }
-    checkPropertyConsistency<const char *>(this, li->Target,
-                                           "COMPATIBLE_INTERFACE_NUMBER_MIN",
-                                           emittedMinNumbers, config,
-                                           NumberMinType, 0);
-    if (cmSystemTools::GetErrorOccuredFlag())
-      {
-      return;
-      }
-    checkPropertyConsistency<const char *>(this, li->Target,
-                                           "COMPATIBLE_INTERFACE_NUMBER_MAX",
-                                           emittedMaxNumbers, config,
-                                           NumberMaxType, 0);
+                                           emittedStrings, config, 0);
     if (cmSystemTools::GetErrorOccuredFlag())
       {
       return;
       }
     }
 
-  std::string prop = intersect(emittedBools,
-                               emittedStrings,
-                               emittedMinNumbers,
-                               emittedMaxNumbers);
-
-  if (!prop.empty())
+  for(std::set<cmStdString>::const_iterator li = emittedBools.begin();
+      li != emittedBools.end(); ++li)
     {
-    std::set<std::string> props;
-    std::set<cmStdString>::const_iterator i = emittedBools.find(prop);
-    if (i != emittedBools.end())
+    const std::set<cmStdString>::const_iterator si = emittedStrings.find(*li);
+    if (si != emittedStrings.end())
       {
-      props.insert("COMPATIBLE_INTERFACE_BOOL");
-      }
-    i = emittedStrings.find(prop);
-    if (i != emittedStrings.end())
-      {
-      props.insert("COMPATIBLE_INTERFACE_STRING");
-      }
-    i = emittedMinNumbers.find(prop);
-    if (i != emittedMinNumbers.end())
-      {
-      props.insert("COMPATIBLE_INTERFACE_NUMBER_MIN");
-      }
-    i = emittedMaxNumbers.find(prop);
-    if (i != emittedMaxNumbers.end())
-      {
-      props.insert("COMPATIBLE_INTERFACE_NUMBER_MAX");
-      }
-
-    std::string propsString = *props.begin();
-    props.erase(props.begin());
-    while (props.size() > 1)
-      {
-      propsString += ", " + *props.begin();
-      props.erase(props.begin());
+      cmOStringStream e;
+      e << "Property \"" << *li << "\" appears in both the "
+      "COMPATIBLE_INTERFACE_BOOL and the COMPATIBLE_INTERFACE_STRING "
+      "property in the dependencies of target \"" << this->GetName() <<
+      "\".  This is not allowed. A property may only require compatibility "
+      "in a boolean interpretation or a string interpretation, but not both.";
+      this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+      break;
       }
-   if (props.size() == 1)
-     {
-     propsString += " and the " + *props.begin();
-     }
-    cmOStringStream e;
-    e << "Property \"" << prop << "\" appears in both the "
-      << propsString <<
-    " property in the dependencies of target \"" << this->GetName() <<
-    "\".  This is not allowed. A property may only require compatibility "
-    "in a boolean interpretation or a string interpretation, but not both.";
-    this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
     }
 }
 
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 9d62f5f..e8f4e08 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -536,20 +536,12 @@ public:
                                             const char *config);
   bool IsLinkInterfaceDependentStringProperty(const std::string &p,
                                               const char *config);
-  bool IsLinkInterfaceDependentNumberMinProperty(const std::string &p,
-                                                 const char *config);
-  bool IsLinkInterfaceDependentNumberMaxProperty(const std::string &p,
-                                                 const char *config);
 
   bool GetLinkInterfaceDependentBoolProperty(const std::string &p,
                                              const char *config);
 
   const char *GetLinkInterfaceDependentStringProperty(const std::string &p,
                                                       const char *config);
-  const char *GetLinkInterfaceDependentNumberMinProperty(const std::string &p,
-                                                         const char *config);
-  const char *GetLinkInterfaceDependentNumberMaxProperty(const std::string &p,
-                                                         const char *config);
 
   std::string GetDebugGeneratorExpressions(const std::string &value,
                                   cmTarget::LinkLibraryType llt);
diff --git a/Tests/CompatibleInterface/CMakeLists.txt b/Tests/CompatibleInterface/CMakeLists.txt
index 8186c61..5ee9fd7 100644
--- a/Tests/CompatibleInterface/CMakeLists.txt
+++ b/Tests/CompatibleInterface/CMakeLists.txt
@@ -20,25 +20,11 @@ set_property(TARGET iface1 APPEND PROPERTY
     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_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 main.cpp)
 target_link_libraries(CompatibleInterface iface1)
@@ -47,10 +33,6 @@ 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)
 
 target_compile_definitions(CompatibleInterface
   PRIVATE
@@ -60,10 +42,6 @@ target_compile_definitions(CompatibleInterface
     $<$<STREQUAL:$<TARGET_PROPERTY:STRING_PROP1>,prop1>:STRING_PROP1>
     $<$<STREQUAL:$<TARGET_PROPERTY:STRING_PROP2>,prop2>:STRING_PROP2>
     $<$<STREQUAL:$<TARGET_PROPERTY:STRING_PROP3>,prop3>:STRING_PROP3>
-    $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MIN_PROP1>,50>:NUMBER_MIN_PROP1=50>
-    $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MIN_PROP2>,200>:NUMBER_MIN_PROP2=200>
-    $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MAX_PROP1>,100>:NUMBER_MAX_PROP1=100>
-    $<$<STREQUAL:$<TARGET_PROPERTY:NUMBER_MAX_PROP2>,250>:NUMBER_MAX_PROP2=250>
 )
 
 
diff --git a/Tests/CompatibleInterface/main.cpp b/Tests/CompatibleInterface/main.cpp
index fa299e9..f5e6e38 100644
--- a/Tests/CompatibleInterface/main.cpp
+++ b/Tests/CompatibleInterface/main.cpp
@@ -23,19 +23,6 @@
 #error Expected STRING_PROP3
 #endif
 
-template<bool test>
-struct CMakeStaticAssert;
-
-template<>
-struct CMakeStaticAssert<true> {};
-
-enum {
-  NumericMaxTest1 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP1 == 100>),
-  NumericMaxTest2 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP2 == 250>),
-  NumericMinTest1 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP1 == 50>),
-  NumericMinTest2 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP2 == 200>)
-};
-
 #include "iface2.h"
 
 int main(int argc, char **argv)

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

Summary of changes:
 Help/manual/cmake-properties.7.rst                |    2 -
 Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst       |    4 +-
 Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst |   17 --
 Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst |   17 --
 Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst     |    5 +-
 Source/cmExportFileGenerator.cxx                  |   14 -
 Source/cmGeneratorExpressionEvaluator.cxx         |   44 ---
 Source/cmTarget.cxx                               |  309 +++------------------
 Source/cmTarget.h                                 |    8 -
 Tests/CompatibleInterface/CMakeLists.txt          |   22 --
 Tests/CompatibleInterface/main.cpp                |   13 -
 11 files changed, 36 insertions(+), 419 deletions(-)
 delete mode 100644 Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst
 delete mode 100644 Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list