[Cmake-commits] CMake branch, next, updated. v2.8.12-4722-g1a7eab3

Brad King brad.king at kitware.com
Thu Oct 31 16:09:12 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  1a7eab3042942b2d0e7a46613ef40162082ba36e (commit)
       via  b04eb4ecff4a9889b7b2c39ec0064ddbacbbd806 (commit)
      from  cdf9734e10278300c03111ebc514724eb521ce6a (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=1a7eab3042942b2d0e7a46613ef40162082ba36e
commit 1a7eab3042942b2d0e7a46613ef40162082ba36e
Merge: cdf9734 b04eb4e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 31 16:09:09 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Oct 31 16:09:09 2013 -0400

    Merge topic 'handle-only-plain-tll' into next
    
    b04eb4e CMP0022: Fix export of link implementation as the link interface


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b04eb4ecff4a9889b7b2c39ec0064ddbacbbd806
commit b04eb4ecff4a9889b7b2c39ec0064ddbacbbd806
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 31 16:06:11 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Oct 31 16:06:33 2013 -0400

    CMP0022: Fix export of link implementation as the link interface

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index ef336ea..d674aef 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -186,6 +186,12 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty(
                       std::vector<std::string> &missingTargets)
 {
   const char *input = target->GetProperty("INTERFACE_LINK_LIBRARIES");
+  if (!input)
+    {
+    // Only the plain target_link_libraries(foo bar) signature was
+    // called so use the link implementation as the link interface.
+    input = target->GetProperty("LINK_LIBRARIES");
+    }
   if (input)
     {
     std::string prepro = cmGeneratorExpression::Preprocess(input,
@@ -629,11 +635,18 @@ cmExportFileGenerator
     return;
     }
 
+  const bool newCMP0022Behavior =
+                        target->GetPolicyStatusCMP0022() != cmPolicies::WARN
+                     && target->GetPolicyStatusCMP0022() != cmPolicies::OLD;
+
   if (iface->ImplementationIsInterface)
     {
-    this->SetImportLinkProperty(suffix, target,
+    if(!newCMP0022Behavior || this->ExportOld)
+      {
+      this->SetImportLinkProperty(suffix, target,
                                 "IMPORTED_LINK_INTERFACE_LIBRARIES",
                                 iface->Libraries, properties, missingTargets);
+      }
     return;
     }
 
@@ -654,10 +667,6 @@ cmExportFileGenerator
     return;
     }
 
-  const bool newCMP0022Behavior =
-                        target->GetPolicyStatusCMP0022() != cmPolicies::WARN
-                     && target->GetPolicyStatusCMP0022() != cmPolicies::OLD;
-
   if(newCMP0022Behavior && !this->ExportOld)
     {
     cmMakefile *mf = target->GetMakefile();
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 421ebf4..221ca16 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6463,33 +6463,6 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
           break;
         }
       }
-    else if (!newExplicitLibraries && !explicitLibraries)
-      {
-      LinkImplementation const* impl = this->GetLinkImplementation(config,
-                                                                  headTarget);
-      if (impl->Libraries.empty())
-        {
-        return false;
-        }
-      typedef std::vector<std::pair<TLLSignature, cmListFileBacktrace> >
-                                                                    Container;
-      for(Container::const_iterator it = this->TLLCommands.begin();
-          it != this->TLLCommands.end(); ++it)
-        {
-        if (it->first == cmTarget::KeywordTLLSignature)
-          {
-          return false;
-          }
-        }
-      // Only target_link_libraries(foo bar) still signatures were used. No
-      // target_link_libraries(foo LINK_INTERFACE_LIBRARIES bar) type was
-      // used, nor was there any attempt to otherwise set a property
-      // matching LINK_INTERFACE_LIBRARIES(_<CONFIG>)?
-      // Use the link implementation as the link interface.
-      iface.Libraries = impl->Libraries;
-      iface.ImplementationIsInterface = true;
-      return true;
-      }
     }
   else if(this->GetType() == cmTarget::STATIC_LIBRARY)
     {
@@ -6615,11 +6588,7 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
         }
       }
     }
-  else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
-        || this->GetPolicyStatusCMP0022() == cmPolicies::OLD)
-    // The implementation shouldn't be the interface if CMP0022 is NEW. That
-    // way, the LINK_LIBRARIES property can be set directly without having to
-    // empty the INTERFACE_LINK_LIBRARIES
+  else
     {
     // The link implementation is the default link interface.
     LinkImplementation const* impl = this->GetLinkImplementation(config,
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 863b391..5174f18 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -301,6 +301,15 @@ bool cmTargetLinkLibrariesCommand
     this->Target->SetProperty("LINK_INTERFACE_LIBRARIES", "");
     }
 
+  // Make sure INTERFACE_LINK_LIBRARIES target property exists
+  // if any signature except the plain one was used.  Other
+  // signatures imply awareness of explicit link interfaces.
+  if(this->CurrentProcessingState != ProcessingLinkLibraries &&
+     !this->Target->GetProperty("INTERFACE_LINK_LIBRARIES"))
+    {
+    this->Target->SetProperty("INTERFACE_LINK_LIBRARIES", "");
+    }
+
   return true;
 }
 

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

Summary of changes:
 Source/cmExportFileGenerator.cxx        |   19 +++++++++++++----
 Source/cmTarget.cxx                     |   33 +------------------------------
 Source/cmTargetLinkLibrariesCommand.cxx |    9 ++++++++
 3 files changed, 24 insertions(+), 37 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list