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  0150c29f395fdb7ce115cdd5bcca59f55b1d574e (commit)
       via  fbcda7fee10fa2f4a0b39a195f711c3bc61b0bf1 (commit)
      from  4c78d989d6c76dcf7b7f79abc42c41d7d6f3679d (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=0150c29f395fdb7ce115cdd5bcca59f55b1d574e
commit 0150c29f395fdb7ce115cdd5bcca59f55b1d574e
Merge: 4c78d98 fbcda7f
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Sun Jan 20 14:35:35 2013 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Jan 20 14:35:35 2013 -0500

    Merge topic 'fix-tll-IMPORTED-targets' into next
    
    fbcda7f Fix use of target_link_libraries with an IMPORTED target.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fbcda7fee10fa2f4a0b39a195f711c3bc61b0bf1
commit fbcda7fee10fa2f4a0b39a195f711c3bc61b0bf1
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Sun Jan 20 19:29:43 2013 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Sun Jan 20 20:35:17 2013 +0100

    Fix use of target_link_libraries with an IMPORTED target.
    
    cmTarget::MaybeInvalidatePropertyCache only invalidates the cache
    for properties matching "IMPORTED_*".
    
    We need to append in the tll implementation to
    the IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG property, because
    that is what is read by cmTarget::ComputeImportInfo in the case
    of no config.

diff --git a/Source/cmTargetLinkLibrariesCommand.cxx 
b/Source/cmTargetLinkLibrariesCommand.cxx
index 0705fb4..9f74821 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -285,6 +285,15 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* 
lib,
     this->Makefile->GetCMakeInstance()->GetDebugConfigs();
   std::string prop;
 
+  std::string prefix;
+  std::string suffix;
+
+  if (this->Target->IsImported())
+    {
+    prefix = "IMPORTED_";
+    suffix = "_NOCONFIG";
+    }
+
   // Include this library in the link interface for the target.
   if(llt == cmTarget::DEBUG || llt == cmTarget::GENERAL)
     {
@@ -292,7 +301,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
     for(std::vector<std::string>::const_iterator i = debugConfigs.begin();
         i != debugConfigs.end(); ++i)
       {
-      prop = "LINK_INTERFACE_LIBRARIES_";
+      prop = prefix + "LINK_INTERFACE_LIBRARIES_";
       prop += *i;
       this->Target->AppendProperty(prop.c_str(), lib);
       }
@@ -300,14 +309,15 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* 
lib,
   if(llt == cmTarget::OPTIMIZED || llt == cmTarget::GENERAL)
     {
     // Put in the non-DEBUG configuration interfaces.
-    this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib);
+    this->Target->AppendProperty(
+                (prefix + "LINK_INTERFACE_LIBRARIES" + suffix).c_str(), lib);
 
     // Make sure the DEBUG configuration interfaces exist so that the
     // general one will not be used as a fall-back.
     for(std::vector<std::string>::const_iterator i = debugConfigs.begin();
         i != debugConfigs.end(); ++i)
       {
-      prop = "LINK_INTERFACE_LIBRARIES_";
+      prop = prefix + "LINK_INTERFACE_LIBRARIES_";
       prop += *i;
       if(!this->Target->GetProperty(prop.c_str()))
         {
diff --git a/Tests/ExportImport/Export/CMakeLists.txt 
b/Tests/ExportImport/Export/CMakeLists.txt
index dd615d1..b015143 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -180,6 +180,12 @@ set_property(TARGET testSharedLibDepends APPEND PROPERTY
 )
 generate_export_header(testSharedLibDepends)
 
+add_library(testSharedLibImportDepend SHARED testSharedLibImportDepend.cpp)
+set_property(TARGET testSharedLibImportDepend APPEND PROPERTY
+  INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}"
+)
+generate_export_header(testSharedLibImportDepend)
+
 set_property(TARGET testSharedLibDepends APPEND PROPERTY
   INTERFACE_INCLUDE_DIRECTORIES
     $<TARGET_PROPERTY:testSharedLibRequired,INTERFACE_INCLUDE_DIRECTORIES>
@@ -203,7 +209,7 @@ install(TARGETS testLibRequired
         EXPORT RequiredExp DESTINATION lib )
 install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredConfig.cmake 
DESTINATION lib/cmake/testLibRequired)
 
-install(TARGETS testLibDepends testSharedLibDepends EXPORT DependsExp 
DESTINATION lib )
+install(TARGETS testLibDepends testSharedLibDepends testSharedLibImportDepend 
EXPORT DependsExp DESTINATION lib )
 install(EXPORT DependsExp FILE testLibDependsConfig.cmake DESTINATION 
lib/cmake/testLibDepends)
 
 
@@ -256,7 +262,7 @@ add_subdirectory(sublib) # For 
CMAKE_BUILD_INTERFACE_INCLUDES test.
 # Export from build tree.
 export(TARGETS testExe1 testLib1 testLib2 testLib3
   testExe2libImp testLib3Imp testLib3ImpDep subdirlib
-  testSharedLibRequired testSharedLibDepends
+  testSharedLibRequired testSharedLibDepends testSharedLibImportDepend
   NAMESPACE bld_
   FILE ExportBuildTree.cmake
   )
diff --git a/Tests/ExportImport/Export/testSharedLibImportDepend.cpp 
b/Tests/ExportImport/Export/testSharedLibImportDepend.cpp
new file mode 100644
index 0000000..dab2952
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibImportDepend.cpp
@@ -0,0 +1,7 @@
+
+#include "testSharedLibImportDepend.h"
+
+int TestSharedLibImportDepend::foo()
+{
+  return 0;
+}
diff --git a/Tests/ExportImport/Export/testSharedLibImportDepend.h 
b/Tests/ExportImport/Export/testSharedLibImportDepend.h
new file mode 100644
index 0000000..18cb7fa
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibImportDepend.h
@@ -0,0 +1,12 @@
+
+#ifndef TESTSHAREDLIBIMPORTDEPEND_H
+#define TESTSHAREDLIBIMPORTDEPEND_H
+
+#include "testsharedlibimportdepend_export.h"
+
+struct TESTSHAREDLIBIMPORTDEPEND_EXPORT TestSharedLibImportDepend
+{
+  int foo();
+};
+
+#endif
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt 
b/Tests/ExportImport/Import/A/CMakeLists.txt
index 4812e7e..7aa69c6 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -162,6 +162,19 @@ target_link_libraries(deps_iface testLibDepends)
 target_include_directories(deps_iface PRIVATE testLibDepends)
 target_compile_definitions(deps_iface PRIVATE testLibDepends)
 
+target_link_libraries(testSharedLibDepends
+  LINK_INTERFACE_LIBRARIES
+    testSharedLibImportDepend
+)
+target_include_directories(testSharedLibDepends
+  INTERFACE
+    testSharedLibImportDepend
+)
+target_compile_definitions(testSharedLibDepends
+  INTERFACE
+    testSharedLibImportDepend
+)
+
 add_executable(deps_shared_iface deps_shared_iface.cpp)
 target_link_libraries(deps_shared_iface testSharedLibDepends)
 target_include_directories(deps_shared_iface PRIVATE testSharedLibDepends)
@@ -181,6 +194,9 @@ else()
   endif()
 endif()
 
+# LinkDependent libraries are populated on export. Why? Should they be?
+# Does that depend on the non-genex content of LINK_INTERFACE_LIBRARIES?
+
 if (run_pic_test)
   target_compile_definitions(deps_shared_iface PRIVATE CHECK_PIC_WORKS)
 endif()
@@ -189,6 +205,18 @@ endif()
 # Test that targets imported from the build tree have their dependencies
 # evaluated correctly. The above already tests the same for the install tree.
 
+target_link_libraries(bld_testSharedLibDepends
+  LINK_INTERFACE_LIBRARIES
+    bld_testSharedLibImportDepend
+)
+target_include_directories(bld_testSharedLibDepends
+  INTERFACE
+  bld_testSharedLibImportDepend
+)
+target_compile_definitions(bld_testSharedLibDepends
+  INTERFACE
+  bld_testSharedLibImportDepend
+)
 add_executable(deps_shared_iface2 deps_shared_iface.cpp)
 target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends 
bld_subdirlib)
 target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends 
bld_subdirlib)
diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp 
b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
index 43f832a..288a1a1 100644
--- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp
+++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
@@ -2,6 +2,8 @@
 
 #include "testSharedLibDepends.h"
 
+#include "testSharedLibImportDepend.h"
+
 #ifdef CHECK_PIC_WORKS
 #if defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)
 #error Expected by INTERFACE_POSITION_INDEPENDENT_CODE property of dependency
@@ -16,12 +18,13 @@ int main(int,char **)
 {
   TestSharedLibDepends dep;
   TestSharedLibRequired req;
+  TestSharedLibImportDepend imp;
 
 #ifdef TEST_SUBDIR_LIB
   SubDirObject sdo;
 #endif
 
-  return dep.foo() + req.foo()
+  return dep.foo() + req.foo() + imp.foo()
 #ifdef TEST_SUBDIR_LIB
                    + sdo.foo()
 #endif

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

Summary of changes:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to