[Cmake-commits] CMake branch, next, updated. v2.8.12-4669-g4bf4f07

Stephen Kelly steveire at gmail.com
Wed Oct 30 11:54:00 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  4bf4f07b8568a014e0813165e667e526b62c63cb (commit)
       via  2a7c1cb70ec875ec3ca57ca1627e5d5692e47913 (commit)
      from  b87e9d2cce86b8490b6e85dde442bfbcaa487d2c (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=4bf4f07b8568a014e0813165e667e526b62c63cb
commit 4bf4f07b8568a014e0813165e667e526b62c63cb
Merge: b87e9d2 2a7c1cb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 30 11:53:57 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 30 11:53:57 2013 -0400

    Merge topic 'handle-only-plain-tll' into next
    
    2a7c1cb Handle use of only plain target_link_libraries with CMP0022.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a7c1cb70ec875ec3ca57ca1627e5d5692e47913
commit 2a7c1cb70ec875ec3ca57ca1627e5d5692e47913
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 30 13:21:53 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Oct 30 16:49:12 2013 +0100

    Handle use of only plain target_link_libraries with CMP0022.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ac655da..421ebf4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6463,6 +6463,33 @@ 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)
     {
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index 07d7c43..cd174d2 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -25,3 +25,10 @@ target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
 
 add_executable(staticlib_exe staticlib_exe.cpp)
 target_link_libraries(staticlib_exe staticlib1)
+
+add_library(onlyplainlib1 SHARED onlyplainlib1.cpp)
+add_library(onlyplainlib2 SHARED onlyplainlib2.cpp)
+target_link_libraries(onlyplainlib2 onlyplainlib1)
+
+add_executable(onlyplainlib_user onlyplainlib_user.cpp)
+target_link_libraries(onlyplainlib_user onlyplainlib2)
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
new file mode 100644
index 0000000..41dc3ce
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
@@ -0,0 +1,13 @@
+
+#include "onlyplainlib1.h"
+
+OnlyPlainLib1::OnlyPlainLib1()
+  : result(0)
+{
+
+}
+
+int OnlyPlainLib1::GetResult()
+{
+  return result;
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
new file mode 100644
index 0000000..c0373ce
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
@@ -0,0 +1,14 @@
+
+struct
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+OnlyPlainLib1
+{
+  OnlyPlainLib1();
+
+  int GetResult();
+
+private:
+  int result;
+};
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
new file mode 100644
index 0000000..2865ae9
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
@@ -0,0 +1,8 @@
+
+#include "onlyplainlib2.h"
+
+OnlyPlainLib1 onlyPlainLib2()
+{
+  OnlyPlainLib1 opl1;
+  return opl1;
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
new file mode 100644
index 0000000..74b18a0
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
@@ -0,0 +1,7 @@
+
+#include "onlyplainlib1.h"
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+OnlyPlainLib1 onlyPlainLib2();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
new file mode 100644
index 0000000..0fb7b0a
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
@@ -0,0 +1,7 @@
+
+#include "onlyplainlib2.h"
+
+int main(int argc, char **argv)
+{
+  return onlyPlainLib2().GetResult();
+}

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

Summary of changes:
 Source/cmTarget.cxx                                |   27 ++++++++++++++++++++
 .../target_link_libraries/cmp0022/CMakeLists.txt   |    7 +++++
 .../cmp0022/onlyplainlib1.cpp                      |   13 +++++++++
 .../target_link_libraries/cmp0022/onlyplainlib1.h  |   14 ++++++++++
 .../cmp0022/onlyplainlib2.cpp                      |    8 ++++++
 .../target_link_libraries/cmp0022/onlyplainlib2.h  |    7 +++++
 .../cmp0022/onlyplainlib_user.cpp                  |    7 +++++
 7 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
 create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
 create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
 create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
 create mode 100644 Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list