[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3947-gae8c28a

Stephen Kelly steveire at gmail.com
Wed Aug 21 03:14:05 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  ae8c28a7a1a50790746ada75c7d9d178c2a214a2 (commit)
       via  668054ffd9e62e7bfe8884bad342152e4c16bb45 (commit)
      from  9367bd4dd10fcc191f68bd21c99c355661937c9f (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=ae8c28a7a1a50790746ada75c7d9d178c2a214a2
commit ae8c28a7a1a50790746ada75c7d9d178c2a214a2
Merge: 9367bd4 668054f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 21 03:14:03 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 21 03:14:03 2013 -0400

    Merge topic 'find-IMPORTED-targets-for-try_compile' into next
    
    668054f Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES for try_compile.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=668054ffd9e62e7bfe8884bad342152e4c16bb45
commit 668054ffd9e62e7bfe8884bad342152e4c16bb45
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 21 08:55:30 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Aug 21 09:08:43 2013 +0200

    Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES for try_compile.

diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index 0a17232..819ac37 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -94,7 +94,8 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target,
     properties[i->first] = i->second.GetValue();
 
     if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
-        || i->first.find("IMPORTED_LINK_DEPENDENT_LIBRARIES") == 0)
+        || i->first.find("IMPORTED_LINK_DEPENDENT_LIBRARIES") == 0
+        || i->first.find("INTERFACE_LINK_LIBRARIES") == 0)
       {
       const std::string libs = i->second.GetValue();
 
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index fb2ca86..1f23b2a 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -227,6 +227,21 @@ install(FILES
     DESTINATION include/testSharedLibRequiredUser
 )
 
+cmake_policy(SET CMP0022 NEW)
+add_library(testSharedLibRequiredUser2 SHARED testSharedLibRequiredUser2.cpp)
+generate_export_header(testSharedLibRequiredUser2)
+set_property(TARGET testSharedLibRequiredUser2 APPEND PROPERTY
+  INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
+)
+set_property(TARGET testSharedLibRequiredUser2 PROPERTY LINK_LIBRARIES testSharedLibRequired)
+set_property(TARGET testSharedLibRequiredUser2 PROPERTY INTERFACE_LINK_LIBRARIES testSharedLibRequired)
+install(FILES
+  "${CMAKE_CURRENT_SOURCE_DIR}/testSharedLibRequiredUser2.h"
+  "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibrequireduser2_export.h"
+    DESTINATION include/testSharedLibRequiredUser2
+)
+cmake_policy(SET CMP0022 OLD)
+
 add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp)
 set_property(TARGET testSharedLibDepends APPEND PROPERTY
   INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}"
@@ -298,6 +313,7 @@ install(TARGETS
           testLibIncludeRequired6
           testSharedLibRequired
           testSharedLibRequiredUser
+          testSharedLibRequiredUser2
           noIncludesInterface
         EXPORT RequiredExp DESTINATION lib
         INCLUDES DESTINATION
@@ -398,7 +414,8 @@ add_subdirectory(sublib) # For CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE test.
 # Export from build tree.
 export(TARGETS testExe1 testLib1 testLib2 testLib3
   testExe2libImp testLib3Imp testLib3ImpDep subdirlib
-  testSharedLibRequired testSharedLibRequiredUser testSharedLibDepends renamed_on_export
+  testSharedLibRequired testSharedLibRequiredUser testSharedLibRequiredUser2
+  testSharedLibDepends renamed_on_export
   cmp0022NEW cmp0022OLD
   NAMESPACE bld_
   FILE ExportBuildTree.cmake
diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
index 0e57c17..1088461 100644
--- a/Tests/ExportImport/Import/try_compile/CMakeLists.txt
+++ b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
@@ -19,3 +19,18 @@ int main(int argc, char **argv)
 if(NOT SHARED_LIB_DEPENDS)
   message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}")
 endif()
+
+set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequiredUser2)
+check_cxx_source_compiles(
+  "
+#include \"testSharedLibRequiredUser2.h\"
+int main(int argc, char **argv)
+{
+  TestSharedLibRequiredUser2 user;
+  return user.foo().foo();
+}
+" SHARED_LIB_DEPENDS2)
+
+if(NOT SHARED_LIB_DEPENDS2)
+  message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}")
+endif()

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

Summary of changes:
 Source/cmExportTryCompileFileGenerator.cxx         |    3 ++-
 Tests/ExportImport/Export/CMakeLists.txt           |   19 ++++++++++++++++++-
 .../ExportImport/Import/try_compile/CMakeLists.txt |   15 +++++++++++++++
 3 files changed, 35 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list