[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3421-g5733d09

Stephen Kelly steveire at gmail.com
Fri Jul 26 09:16:35 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  5733d09f2de678e5c65d7fa29d1d96f3a941ef2b (commit)
       via  c8a10ba9ad8707cfb892ca812efa2f6899adf60b (commit)
      from  801dba4c032b882f64bf94733095e13d3d4eec96 (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=5733d09f2de678e5c65d7fa29d1d96f3a941ef2b
commit 5733d09f2de678e5c65d7fa29d1d96f3a941ef2b
Merge: 801dba4 c8a10ba
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jul 26 09:16:28 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jul 26 09:16:28 2013 -0400

    Merge topic 'minor-cleanups' into next
    
    c8a10ba cmTarget: Fix iface libraries and languages for static libraries.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8a10ba9ad8707cfb892ca812efa2f6899adf60b
commit c8a10ba9ad8707cfb892ca812efa2f6899adf60b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jul 26 14:03:44 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Jul 26 15:15:42 2013 +0200

    cmTarget: Fix iface libraries and languages for static libraries.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 136c43c..622e812 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6467,6 +6467,15 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
             break;
           }
         }
+      else
+        {
+        iface.Libraries = impl->Libraries;
+        if(this->GetType() == cmTarget::STATIC_LIBRARY)
+          {
+          // Targets using this archive need its language runtime libraries.
+          iface.Languages = impl->Languages;
+          }
+        }
       }
     }
 
@@ -6495,7 +6504,8 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
                                         headTarget,
                                         this, &dagChecker), iface.Libraries);
 
-    if(this->GetType() == cmTarget::SHARED_LIBRARY)
+    if(this->GetType() == cmTarget::SHARED_LIBRARY
+        || this->GetType() == cmTarget::STATIC_LIBRARY)
       {
       // Shared libraries may have runtime implementation dependencies
       // on other shared libraries that are not in the interface.
@@ -6529,6 +6539,11 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
             }
           }
         }
+      if(this->GetType() == cmTarget::STATIC_LIBRARY)
+        {
+        // Targets using this archive need its language runtime libraries.
+        iface.Languages = impl->Languages;
+        }
       }
     }
   else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index dd6ab41..07d7c43 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -16,3 +16,12 @@ assert_property(cmp0022ifacelib INTERFACE_LINK_LIBRARIES "")
 
 add_executable(cmp0022exe cmp0022exe.cpp)
 target_link_libraries(cmp0022exe cmp0022lib)
+
+add_library(staticlib1 STATIC staticlib1.cpp)
+generate_export_header(staticlib1)
+add_library(staticlib2 STATIC staticlib2.cpp)
+generate_export_header(staticlib2)
+target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
+
+add_executable(staticlib_exe staticlib_exe.cpp)
+target_link_libraries(staticlib_exe staticlib1)
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp
new file mode 100644
index 0000000..a253c46
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp
@@ -0,0 +1,2 @@
+
+int staticlib1() { return 0; }
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h
new file mode 100644
index 0000000..4bbf23f
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h
@@ -0,0 +1,4 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int staticlib1();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp
new file mode 100644
index 0000000..4e38063
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp
@@ -0,0 +1,2 @@
+
+int staticlib2() { return 0; }
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h
new file mode 100644
index 0000000..a4e07b6
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h
@@ -0,0 +1,4 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int staticlib2();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib_exe.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib_exe.cpp
new file mode 100644
index 0000000..97adc40
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib_exe.cpp
@@ -0,0 +1,8 @@
+
+#include "staticlib1.h"
+#include "staticlib2.h"
+
+int main()
+{
+  return staticlib1() + staticlib2();
+}

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list