[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1175-g379e721

Stephen Kelly steveire at gmail.com
Sun Dec 2 03:21:14 EST 2012


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  379e7212a08a427d33ea1a77def31d3cc296c874 (commit)
       via  e9923e075c55d9bebe2d4655641c26b8b9514260 (commit)
       via  d75a03a976c392364b2e21732cf1b506fec62089 (commit)
       via  30348d518f2a2c522287d51ff5460ae78019709c (commit)
       via  6324fdaa605369eb605fb09ee4365fb9190546d5 (commit)
      from  6d50924598c39b42528422542e8716f30b60b3d9 (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=379e7212a08a427d33ea1a77def31d3cc296c874
commit 379e7212a08a427d33ea1a77def31d3cc296c874
Merge: 6d50924 e9923e0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Dec 2 03:21:13 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Dec 2 03:21:13 2012 -0500

    Merge topic 'add-INTERFACE_LINK_LIBRARIES-property' into next
    
    e9923e0 Use the DEBUG_CONFIG generator expression.
    d75a03a Add the DEBUG_CONFIG generator expression.
    30348d5 Check that link-type keywords don't appear in INTERFACE_LINK_LIBRARIES.
    6324fda Update the CMP0019 documentation.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9923e075c55d9bebe2d4655641c26b8b9514260
commit e9923e075c55d9bebe2d4655641c26b8b9514260
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Dec 2 09:19:20 2012 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Dec 2 09:19:20 2012 +0100

    Use the DEBUG_CONFIG generator expression.

diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index f24180a..68565db 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -262,13 +262,13 @@ static std::string generatorIface(const std::string &value,
 {
   if (llt == cmTarget::DEBUG)
     {
-    return "$<$<CONFIG:Debug>:"
+    return "$<$<CONFIG_DEBUG>:"
                      + value
                      + ">";
     }
   else if (llt == cmTarget::OPTIMIZED)
     {
-    return "$<$<NOT:$<CONFIG:Debug>>:"
+    return "$<$<NOT:$<CONFIG_DEBUG>>:"
                      + value
                      + ">";
     }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d75a03a976c392364b2e21732cf1b506fec62089
commit d75a03a976c392364b2e21732cf1b506fec62089
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Dec 2 09:18:27 2012 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Dec 2 09:19:10 2012 +0100

    Add the DEBUG_CONFIG generator expression.

diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h
index 2899e05..af48ef1 100644
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@ -19,6 +19,8 @@
   "  $<0:...>                  = empty string (ignores \"...\")\n"      \
   "  $<1:...>                  = content of \"...\"\n"                  \
   "  $<CONFIG:cfg>             = '1' if config is \"cfg\", else '0'\n"  \
+  "  $<CONFIG_DEBUG>           = '1' if the current config is a debug " \
+  "config, else '0'\n"                                                  \
   "  $<CONFIGURATION>          = configuration name\n"                  \
   "  $<BOOL:...>               = '1' if the '...' is true, else '0'\n"  \
   "  $<STREQUAL:a,b>           = '1' if a is STREQUAL b, else '0'\n"    \
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index b8e7f76..784596c 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -288,6 +288,38 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
 } configurationTestNode;
 
 //----------------------------------------------------------------------------
+static const struct DebugTestNode : public cmGeneratorExpressionNode
+{
+  DebugTestNode() {}
+
+  virtual int NumExpectedParameters() const { return 0; }
+
+  std::string Evaluate(const std::vector<std::string> &,
+                       cmGeneratorExpressionContext *context,
+                       const GeneratorExpressionContent *,
+                       cmGeneratorExpressionDAGChecker *) const
+  {
+    if (!context->Config)
+      {
+      return "0";
+      }
+
+    std::vector<std::string> const& debugConfigs =
+                    context->Makefile->GetCMakeInstance()->GetDebugConfigs();
+    std::string configUpper = cmSystemTools::UpperCase(context->Config);
+    for(std::vector<std::string>::const_iterator i = debugConfigs.begin();
+        i != debugConfigs.end(); ++i)
+      {
+      if(*i == configUpper)
+        {
+        return "1";
+        }
+      }
+    return "0";
+  }
+} debugTestNode;
+
+//----------------------------------------------------------------------------
 static const struct TargetPropertyNode : public cmGeneratorExpressionNode
 {
   TargetPropertyNode() {}
@@ -590,6 +622,8 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier)
     return &configurationNode;
   else if (identifier == "CONFIG")
     return &configurationTestNode;
+  else if (identifier == "CONFIG_DEBUG")
+    return &debugTestNode;
   else if (identifier == "TARGET_FILE")
     return &targetFileNode;
   else if (identifier == "TARGET_LINKER_FILE")
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 66c190a..c2dd55a 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -23,6 +23,7 @@ add_custom_target(check-part1 ALL
     -Dtest_config_release=$<CONFIG:Release>$<CONFIG:RELEASE>$<CONFIG:ReLeAsE>
     -Dtest_config_relwithdebinfo=$<CONFIG:RelWithDebInfo>$<CONFIG:RELWITHDEBINFO>$<CONFIG:relwithdebinfo>
     -Dtest_config_minsizerel=$<CONFIG:MinSizeRel>$<CONFIG:MINSIZEREL>$<CONFIG:minsizerel>
+    -Dtest_config_is_debug=$<CONFIG:Debug>$<CONFIG_DEBUG>
     -Dtest_not_0=$<NOT:0>
     -Dtest_not_1=$<NOT:1>
     -Dtest_or_0=$<OR:0>
diff --git a/Tests/GeneratorExpression/check-part1.cmake b/Tests/GeneratorExpression/check-part1.cmake
index 7abfa82..39f441f 100644
--- a/Tests/GeneratorExpression/check-part1.cmake
+++ b/Tests/GeneratorExpression/check-part1.cmake
@@ -20,6 +20,9 @@ foreach(c debug release relwithdebinfo minsizerel)
     message(SEND_ERROR "test_config_${c} is \"${test_config_${c}}\", not all 0 or all 1")
   endif()
 endforeach()
+if(NOT "${test_config_is_debug}" MATCHES "^(0+|1+)$")
+  message(SEND_ERROR "test_config_is_debug is \"${test_config_is_debug}\", not both 0 or both 1")
+endif()
 check(test_not_0 "1")
 check(test_not_1 "0")
 check(test_or_0 "0")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30348d518f2a2c522287d51ff5460ae78019709c
commit 30348d518f2a2c522287d51ff5460ae78019709c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Dec 2 09:15:09 2012 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Dec 2 09:15:09 2012 +0100

    Check that link-type keywords don't appear in INTERFACE_LINK_LIBRARIES.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index bfdd13a..f9b3bcd 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2538,6 +2538,29 @@ void cmTarget::MaybeInvalidatePropertyCache(const char* prop)
 }
 
 //----------------------------------------------------------------------------
+static void cmTargetCheckINTERFACE_LINK_LIBRARIES(const char* value,
+                                                  cmMakefile* context)
+{
+  // Look for link-type keywords in the value.
+  static cmsys::RegularExpression
+    keys("(^|;)(debug|optimized|general)(;|$)");
+  if(!keys.find(value))
+    {
+    return;
+    }
+
+  // Report an error.
+  cmOStringStream e;
+
+  e << "Property INTERFACE_LINK_LIBRARIES may not contain link-type "
+    "keyword \"" << keys.match(2) << "\".  The INTERFACE_LINK_LIBRARIES "
+    "property may contain configuration-sensitive generator-expressions "
+    "which may be used to specify per-configuration rules.";
+
+  context->IssueMessage(cmake::FATAL_ERROR, e.str());
+}
+
+//----------------------------------------------------------------------------
 static void cmTargetCheckLINK_INTERFACE_LIBRARIES(
   const char* prop, const char* value, cmMakefile* context, bool imported
   )
@@ -2598,6 +2621,13 @@ void cmTarget::CheckProperty(const char* prop, cmMakefile* context)
       cmTargetCheckLINK_INTERFACE_LIBRARIES(prop, value, context, true);
       }
     }
+  if(strncmp(prop, "INTERFACE_LINK_LIBRARIES", 24) == 0)
+    {
+    if(const char* value = this->GetProperty(prop))
+      {
+      cmTargetCheckINTERFACE_LINK_LIBRARIES(value, context);
+      }
+    }
 }
 
 //----------------------------------------------------------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6324fdaa605369eb605fb09ee4365fb9190546d5
commit 6324fdaa605369eb605fb09ee4365fb9190546d5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Dec 2 09:12:07 2012 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Dec 2 09:12:07 2012 +0100

    Update the CMP0019 documentation.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index d9bd803..aa08b99 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -494,26 +494,49 @@ cmPolicies::cmPolicies()
 
     this->DefinePolicy(
     CMP0019, "CMP0019",
-    "Use INTERFACE_LINK_LIBRARIES instead of "
-    "LINK_INTERFACE_LIBRARIES_<CONFIG>.",
-    "CMake 2.8.10 used properties matching "
-    "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? "
-    "to determine the link interface.  CMake 2.8.11 and higher "
-    "prefer instead to use the INTERFACE_LINK_LIBRARIES target property to "
-    "determine the link interface, while ignoring properties matching"
-    "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? completely. The new "
-    "INTERFACE_LINK_LIBRARIES target property can use generator expressions "
-    "to specify config-specific link libraries."
+    "Use INTERFACE_LINK_LIBRARIES instead of LINK_INTERFACE_LIBRARIES.",
+    "A CMake shared library target (or an executable with the "
+    "ENABLE_EXPORTS property) may be given a \"link interface\" "
+    "determining the libraries that must be linked by its dependents.  "
+    "CMake 2.8.10 and lower used the LINK_INTERFACE_LIBRARIES and "
+    "LINK_INTERFACE_LIBRARIES_<CONFIG> target properties "
+    "to determine the link interface.  "
+    "CMake 2.8.11 and higher prefer the single "
+    "INTERFACE_LINK_LIBRARIES target property "
+    "to determine the link interface.  "
+    "The new property supports generator expressions "
+    "to specify configuration-specific link libraries."
     "\n"
-    "The OLD behavior for this policy is to ignore the "
-    "INTERFACE_LINK_LIBRARIES property for all targets and use the "
-    "value of the appropriate property matching "
-    "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? instead."
+    "This policy is not considered when loading IMPORTED targets.  "
+    "However, it does affect how the export() and install(EXPORT) "
+    "commands generate imported targets for use in dependent projects.  "
     "\n"
-    "The NEW behavior for this policy is to ignore "
-    "the value of the property matching "
-    "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? and use "
-    "INTERFACE_LINK_LIBRARIES instead.",
+    "The OLD behavior for this policy is to ignore the new "
+    "INTERFACE_LINK_LIBRARIES property and use the old "
+    "LINK_INTERFACE_LIBRARIES(_<CONFIG>) properties to determine the "
+    "link interface.  "
+    "Targets named after LINK_PUBLIC in target_link_libraries will "
+    "populate the old properties and not the new.  "
+    "The export() and install(EXPORT) commands will generate only the "
+    "IMPORTED_LINK_INTERFACE_LIBRARIES(_<CONFIG>) properties on a "
+    "target to be imported into other projects, and not "
+    "INTERFACE_LINK_LIBRARIES.  "
+    "\n"
+    "The NEW behavior for this policy is to ignore the old "
+    "LINK_INTERFACE_LIBRARIES(_<CONFIG>) properties and use the new "
+    "INTERFACE_LINK_LIBRARIES property to determine the link interface.  "
+    "Targets named after LINK_PUBLIC in target_link_libraries will "
+    "populate the new property and not the old.  "
+    "The export() and install(EXPORT) commands will generate the new "
+    "INTERFACE_LINK_LIBRARIES property on a target to be imported "
+    "into other projects.  "
+    "They will generate IMPORTED_LINK_INTERFACE_LIBRARIES(_<CONFIG>) "
+    "properties only if LINK_INTERFACE_LIBRARIES(_<CONFIG>) have been "
+    "set explicitly on the target to be exported."
+    "\n"
+    "The setting for this policy used to determine the link interface is "
+    "that in effect when the target is created by an add_library or "
+    "add_executable command.",
     2,8,11,0, cmPolicies::WARN);
 }
 

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

Summary of changes:
 Source/cmDocumentGeneratorExpressions.h     |    2 +
 Source/cmGeneratorExpressionEvaluator.cxx   |   34 +++++++++++++++
 Source/cmPolicies.cxx                       |   59 ++++++++++++++++++--------
 Source/cmTarget.cxx                         |   30 ++++++++++++++
 Source/cmTargetLinkLibrariesCommand.cxx     |    4 +-
 Tests/GeneratorExpression/CMakeLists.txt    |    1 +
 Tests/GeneratorExpression/check-part1.cmake |    3 +
 7 files changed, 113 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list