[Cmake-commits] CMake branch, next, updated. v2.8.6-2207-g39314a1

Brad King brad.king at kitware.com
Wed Dec 14 12:45:31 EST 2011


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  39314a1cfc6ceb7ca82a41f7e31eabc88f3fb5b3 (commit)
       via  183b95098ea4102da5ca510e8c7a36106a5c257a (commit)
       via  4ed1769186f0622efced9d89e6593d136c920dd2 (commit)
      from  ee9dd859ef6f5f1caf9b87430130470855af35f9 (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=39314a1cfc6ceb7ca82a41f7e31eabc88f3fb5b3
commit 39314a1cfc6ceb7ca82a41f7e31eabc88f3fb5b3
Merge: ee9dd85 183b950
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Dec 14 12:45:26 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Dec 14 12:45:26 2011 -0500

    Merge topic 'transitive-shared-lib-depend' into next
    
    183b950 Follow all dependencies of shared library private dependencies
    4ed1769 KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=183b95098ea4102da5ca510e8c7a36106a5c257a
commit 183b95098ea4102da5ca510e8c7a36106a5c257a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Dec 14 11:28:42 2011 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Dec 14 11:33:01 2011 -0500

    Follow all dependencies of shared library private dependencies
    
    In cmComputeLinkDepends we compute the transitive closure of private
    shared library dependencies.  When a shared library is added to this
    closure we must follow all of its dependencies whether they are private
    or public.  Previously we only followed the private dependencies.  Fix
    the implementation to follow the public dependencies too.  Also extend
    the ExportImport test to cover this case.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 1021bf2..802cfcf 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -429,7 +429,8 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
     if(cmTarget::LinkInterface const* iface =
        entry.Target->GetLinkInterface(this->Config))
       {
-      // We use just the shared dependencies, not the interface.
+      // Follow public and private dependencies transitively.
+      this->QueueSharedDependencies(index, iface->Libraries);
       this->QueueSharedDependencies(index, iface->SharedDeps);
       }
     }
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 235a1d2..f06a465 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -23,8 +23,13 @@ add_library(testLib1 STATIC testLib1.c)
 add_library(testLib2 STATIC testLib2.c)
 target_link_libraries(testLib2 testLib1)
 
+# Test library with empty link interface.  Link it to an implementation
+# dependency that itself links to dependencies publicly.
+add_library(testLib3ImpDep SHARED testLib3ImpDep.c)
+set_property(TARGET testLib3ImpDep PROPERTY LIBRARY_OUTPUT_DIRECTORY impl/dep)
 add_library(testLib3Imp SHARED testLib3Imp.c)
 set_property(TARGET testLib3Imp PROPERTY LIBRARY_OUTPUT_DIRECTORY impl)
+target_link_libraries(testLib3Imp testLib3ImpDep)
 add_library(testLib3 SHARED testLib3.c)
 target_link_libraries(testLib3 testLib3Imp)
 set_property(TARGET testLib3 PROPERTY LINK_INTERFACE_LIBRARIES "")
@@ -105,6 +110,14 @@ install(
   ARCHIVE DESTINATION lib/impl
   )
 install(
+  TARGETS
+  testLib3ImpDep
+  EXPORT exp
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib/impl/dep
+  ARCHIVE DESTINATION lib/impl/dep
+  )
+install(
   TARGETS testLib5
   EXPORT exp
   # Leave out RUNTIME DESTINATION to test implib-only export.
@@ -120,7 +133,7 @@ endif(WIN32)
 
 # Export from build tree.
 export(TARGETS testExe1 testLib1 testLib2 testLib3
-  testExe2libImp testLib3Imp
+  testExe2libImp testLib3Imp testLib3ImpDep
   NAMESPACE bld_
   FILE ExportBuildTree.cmake
   )
diff --git a/Tests/ExportImport/Export/testLib3Imp.c b/Tests/ExportImport/Export/testLib3Imp.c
index fb4c13f..c27bccd 100644
--- a/Tests/ExportImport/Export/testLib3Imp.c
+++ b/Tests/ExportImport/Export/testLib3Imp.c
@@ -1,7 +1,10 @@
 #if defined(_WIN32) || defined(__CYGWIN__)
 # define testLib3Imp_EXPORT __declspec(dllexport)
+# define testLib3ImpDep_IMPORT __declspec(dllimport)
 #else
 # define testLib3Imp_EXPORT
+# define testLib3ImpDep_IMPORT
 #endif
 
-testLib3Imp_EXPORT int testLib3Imp(void) { return 0; }
+testLib3ImpDep_IMPORT int testLib3ImpDep(void);
+testLib3Imp_EXPORT int testLib3Imp(void) { return testLib3ImpDep(); }
diff --git a/Tests/ExportImport/Export/testLib3ImpDep.c b/Tests/ExportImport/Export/testLib3ImpDep.c
new file mode 100644
index 0000000..578ac30
--- /dev/null
+++ b/Tests/ExportImport/Export/testLib3ImpDep.c
@@ -0,0 +1,7 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define testLib3ImpDep_EXPORT __declspec(dllexport)
+#else
+# define testLib3ImpDep_EXPORT
+#endif
+
+testLib3ImpDep_EXPORT int testLib3ImpDep(void) { return 0; }

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

Summary of changes:
 Source/cmComputeLinkDepends.cxx            |    3 ++-
 Source/kwsys/kwsysDateStamp.cmake          |    2 +-
 Tests/ExportImport/Export/CMakeLists.txt   |   15 ++++++++++++++-
 Tests/ExportImport/Export/testLib3Imp.c    |    5 ++++-
 Tests/ExportImport/Export/testLib3ImpDep.c |    7 +++++++
 5 files changed, 28 insertions(+), 4 deletions(-)
 create mode 100644 Tests/ExportImport/Export/testLib3ImpDep.c


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list