[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1179-g65c52b0

Brad King brad.king at kitware.com
Mon Dec 3 08:38:05 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  65c52b0b50553ce851579845b2617b64484102b3 (commit)
       via  3a1660d29e2ed9e12272b37906f0d0fbe4825fd6 (commit)
       via  977a098fd3b06b1aac65be590857eaeb4f60037a (commit)
       via  93ac4630acad1775dd1703ad357bc94273d5e1d5 (commit)
      from  379e7212a08a427d33ea1a77def31d3cc296c874 (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=65c52b0b50553ce851579845b2617b64484102b3
commit 65c52b0b50553ce851579845b2617b64484102b3
Merge: 379e721 3a1660d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 3 08:37:47 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 3 08:37:47 2012 -0500

    Merge topic 'add-INTERFACE_LINK_LIBRARIES-property' into next
    
    3a1660d GenEx: Clarify $<CONFIG_DEBUG> documentation
    977a098 Cleanup INTERFACE_LINK_LIBRARIES property implementation
    93ac463 Fix typo in CMP0019 documentation


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a1660d29e2ed9e12272b37906f0d0fbe4825fd6
commit 3a1660d29e2ed9e12272b37906f0d0fbe4825fd6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 3 08:23:51 2012 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 3 08:23:51 2012 -0500

    GenEx: Clarify $<CONFIG_DEBUG> documentation
    
    Refer to the global property that describes what a "debug" configuration
    means.

diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h
index af48ef1..60ff89b 100644
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@ -20,7 +20,7 @@
   "  $<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"                                                  \
+  "config (see global property DEBUG_CONFIGURATIONS), 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"    \

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=977a098fd3b06b1aac65be590857eaeb4f60037a
commit 977a098fd3b06b1aac65be590857eaeb4f60037a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Nov 1 00:32:10 2012 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 3 08:11:43 2012 -0500

    Cleanup INTERFACE_LINK_LIBRARIES property implementation
    
    In cmTarget::ComputeLinkInterface expand the old and new link interface
    properties only when necessary based on CMP0019.  Add a missing newline
    in the property documentation.  Simplify cmTarget::ComputeImportInfo.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f9b3bcd..723e721 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -736,6 +736,7 @@ void cmTarget::DefineProperties(cmake *cm)
      "CMAKE_INTERFACE_LINK_LIBRARIES if it is set when a target is "
      "created.  "
      "This property is ignored for STATIC libraries."
+     "\n"
      CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS);
 
   cm->DefineProperty
@@ -4526,12 +4527,8 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
     }
 
   // Get the link interface.
-  {
-  std::vector<std::string> usedLinkLibraries;
-
-  const char* newStyleLibsProp = this->GetProperty(
-                                                "INTERFACE_LINK_LIBRARIES");
-  if(newStyleLibsProp)
+  if(const char* newStyleLibsProp =
+     this->GetProperty("INTERFACE_LINK_LIBRARIES"))
     {
     cmListFileBacktrace lfbt;
     cmGeneratorExpression ge(lfbt);
@@ -4545,30 +4542,24 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
                                                   false,
                                                   this,
                                                   &dagChecker),
-                                      usedLinkLibraries);
+                                      info.LinkInterface.Libraries);
     }
   else
     {
     std::string linkProp = "IMPORTED_LINK_INTERFACE_LIBRARIES";
-    const char *oldProp = this->GetProperty((linkProp + suffix).c_str());
-    if(oldProp)
+    linkProp += suffix;
+    if(const char* config_libs = this->GetProperty(linkProp.c_str()))
       {
-      linkProp += suffix;
-      cmSystemTools::ExpandListArgument(oldProp, usedLinkLibraries);
+      cmSystemTools::ExpandListArgument(config_libs,
+                                        info.LinkInterface.Libraries);
       }
-    else
+    else if(const char* libs =
+            this->GetProperty("IMPORTED_LINK_INTERFACE_LIBRARIES"))
       {
-      oldProp = this->GetProperty("IMPORTED_LINK_INTERFACE_LIBRARIES");
-      if(oldProp)
-        {
-        cmSystemTools::ExpandListArgument(oldProp, usedLinkLibraries);
-        }
+      cmSystemTools::ExpandListArgument(libs,
+                                        info.LinkInterface.Libraries);
       }
     }
-  info.LinkInterface.Libraries.insert(info.LinkInterface.Libraries.end(),
-                      usedLinkLibraries.begin(), usedLinkLibraries.end());
-  }
-
 
   // Get the link dependencies.
   {
@@ -4676,49 +4667,56 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface)
 
   // An explicit list of interface libraries may be set for shared
   // libraries and executables that export symbols.
-  bool explicitLibraries = false;
-  std::vector<std::string> usedLinkLibraries;
+  std::vector<std::string>* explicitLibraries = 0;
+  std::vector<std::string> oldInterfaceLibs;
+  std::vector<std::string> newInterfaceLibs;
   if(this->GetType() == cmTarget::SHARED_LIBRARY ||
      this->IsExecutableWithExports())
     {
-    const char *newLibrariesProp =
-                                 this->GetProperty("INTERFACE_LINK_LIBRARIES");
-
-    std::vector<std::string> newInterfaceLibs;
-    std::vector<std::string> oldInterfaceLibs;
-
-    if(newLibrariesProp)
+    std::string oldPropName;
+    const char *oldLibrariesProp = 0;
+    const char *newLibrariesProp = 0;
+    if(this->PolicyStatusCMP0019 == cmPolicies::OLD ||
+       this->PolicyStatusCMP0019 == cmPolicies::WARN)
       {
-      cmListFileBacktrace lfbt;
-      cmGeneratorExpression ge(lfbt);
-
-      cmGeneratorExpressionDAGChecker dagChecker(lfbt,
-                                          this->GetName(),
-                                          "INTERFACE_LINK_LIBRARIES", 0, 0);
-
-      cmSystemTools::ExpandListArgument(ge.Parse(newLibrariesProp).Evaluate(
-                                      this->Makefile,
-                                      config,
-                                      false,
-                                      this,
-                                      &dagChecker), newInterfaceLibs);
-      }
-    // Lookup the per-configuration property.
-    std::string propName = "LINK_INTERFACE_LIBRARIES";
-    propName += suffix;
-    const char *oldLibrariesProp = this->GetProperty(propName.c_str());
+      // Lookup the per-configuration property.
+      std::string propName = "LINK_INTERFACE_LIBRARIES";
+      propName += suffix;
+      oldLibrariesProp = this->GetProperty(propName.c_str());
 
-    // If not set, try the generic property.
-    if(!oldLibrariesProp)
-      {
-      oldLibrariesProp = this->GetProperty("LINK_INTERFACE_LIBRARIES");
+      // If not set, try the generic property.
+      if(!oldLibrariesProp)
+        {
+        oldLibrariesProp = this->GetProperty("LINK_INTERFACE_LIBRARIES");
+        oldPropName = "LINK_INTERFACE_LIBRARIES";
+        }
+      else
+        {
+        oldPropName = propName;
+        }
+      if(oldLibrariesProp)
+        {
+        cmSystemTools::ExpandListArgument(oldLibrariesProp, oldInterfaceLibs);
+        }
       }
-    if(oldLibrariesProp)
+    if(this->PolicyStatusCMP0019 != cmPolicies::OLD)
       {
-      cmSystemTools::ExpandListArgument(oldLibrariesProp, oldInterfaceLibs);
+      newLibrariesProp = this->GetProperty("INTERFACE_LINK_LIBRARIES");
+      if(newLibrariesProp)
+        {
+        cmListFileBacktrace lfbt;
+        cmGeneratorExpression ge(lfbt);
+        cmGeneratorExpressionDAGChecker dagChecker(
+          lfbt, this->GetName(), "INTERFACE_LINK_LIBRARIES", 0, 0);
+        cmSystemTools::ExpandListArgument(ge.Parse(newLibrariesProp).Evaluate(
+                                            this->Makefile,
+                                            config,
+                                            false,
+                                            this,
+                                            &dagChecker), newInterfaceLibs);
+        }
       }
 
-    {
     switch (this->PolicyStatusCMP0019)
       {
       case cmPolicies::WARN:
@@ -4727,7 +4725,7 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface)
             && !handleCMP0019(newInterfaceLibs, oldInterfaceLibs))
           {
           cmOStringStream e;
-          e << "The INTERFACE_LINK_LIBRARIES and LINK_INTERFACE_LIBRARIES are "
+          e << "The INTERFACE_LINK_LIBRARIES and " << oldPropName << " are "
                "not the same for target \"" << this->GetName() << "\".\n"
                "NEW content is \""
             << (newLibrariesProp ? newLibrariesProp : "(unset)") << "\"\n"
@@ -4740,18 +4738,15 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface)
           // fall through to OLD behaviour
         }
         case cmPolicies::OLD:
-          explicitLibraries = oldLibrariesProp ? true : false;
-          usedLinkLibraries = oldInterfaceLibs;
+          explicitLibraries = oldLibrariesProp ? &oldInterfaceLibs : 0;
           break;
         case cmPolicies::REQUIRED_IF_USED:
         case cmPolicies::REQUIRED_ALWAYS:
         case cmPolicies::NEW:
         default:
-          usedLinkLibraries = newInterfaceLibs;
-          explicitLibraries = newLibrariesProp ? true : false;
+          explicitLibraries = newLibrariesProp ? &newInterfaceLibs : 0;
       }
     }
-    }
 
   // There is no implicit link interface for executables or modules
   // so if none was explicitly set then there is no link interface.
@@ -4767,8 +4762,7 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface)
   if(explicitLibraries)
     {
     // The interface libraries have been explicitly set.
-    iface.Libraries.insert(iface.Libraries.end(),
-                          usedLinkLibraries.begin(), usedLinkLibraries.end());
+    iface.Libraries = *explicitLibraries;
 
     if(this->GetType() == cmTarget::SHARED_LIBRARY)
       {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93ac4630acad1775dd1703ad357bc94273d5e1d5
commit 93ac4630acad1775dd1703ad357bc94273d5e1d5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 3 08:06:43 2012 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 3 08:08:32 2012 -0500

    Fix typo in CMP0019 documentation
    
    In the OLD behavior of the policy the target_link_libraries LINK_PUBLIC
    option will still populate the new INTERFACE_LINK_LIBRARIES property.
    The value will be ignored except for determining whether to warn when
    the policy is not set.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index aa08b99..304904a 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -516,7 +516,7 @@ cmPolicies::cmPolicies()
     "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.  "
+    "populate the old properties and 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 "

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

Summary of changes:
 Source/cmDocumentGeneratorExpressions.h |    2 +-
 Source/cmPolicies.cxx                   |    2 +-
 Source/cmTarget.cxx                     |  120 +++++++++++++++----------------
 3 files changed, 59 insertions(+), 65 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list