diff options
author | Brad King <brad.king@kitware.com> | 2013-07-15 13:33:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-15 13:33:42 (GMT) |
commit | b6e0972262241b287fa4048b29dd920fecf22ea1 (patch) | |
tree | bd40298d5fc53e33478e566cc8e937dae40a0a93 /Tests/ExportImport/Export | |
parent | f6024ef420103c4cb393d7752f7e110c5e0d5dfe (diff) | |
parent | 3e30d9ed67f963af15b8d57d24a5fa377299e43a (diff) | |
download | CMake-b6e0972262241b287fa4048b29dd920fecf22ea1.zip CMake-b6e0972262241b287fa4048b29dd920fecf22ea1.tar.gz CMake-b6e0972262241b287fa4048b29dd920fecf22ea1.tar.bz2 |
Merge topic 'INTERFACE_LINK_LIBRARIES-prop'
3e30d9e TLL: Don't populate old link interface if CMP0022 is NEW.
574fec9 Export: Generate INTERFACE_LINK_LIBRARIES property on targets.
d0a76ea Introduce the INTERFACE_LINK_LIBRARIES property.
ddde61c Introduce the LINK_ONLY generator expression.
5aa9731 GenexEval: Add abstracted access to link interface for a target.
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 29 | ||||
-rw-r--r-- | Tests/ExportImport/Export/cmp0022.cpp | 7 | ||||
-rw-r--r-- | Tests/ExportImport/Export/cmp0022.h | 4 | ||||
-rw-r--r-- | Tests/ExportImport/Export/cmp0022_vs6_1.cpp | 1 | ||||
-rw-r--r-- | Tests/ExportImport/Export/cmp0022_vs6_2.cpp | 1 |
5 files changed, 42 insertions, 0 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 73a4b9b..370dffe 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -235,6 +235,33 @@ target_link_libraries(testSharedLibDepends LINK_PUBLIC renamed_on_export) target_link_libraries(testSharedLibDepends LINK_INTERFACE_LIBRARIES $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:$<TARGET_NAME:testSharedLibRequired>>) +add_library(cmp0022OLD SHARED cmp0022_vs6_1.cpp) +generate_export_header(cmp0022OLD BASE_NAME cmp0022) +target_include_directories(cmp0022OLD PUBLIC + "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" + "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/cmp0022>" +) +cmake_policy(SET CMP0022 NEW) +add_library(cmp0022NEW SHARED cmp0022_vs6_1.cpp) +target_include_directories(cmp0022NEW PUBLIC + "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" + "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/cmp0022>" +) +cmake_policy(SET CMP0022 OLD) +install(FILES + "${CMAKE_CURRENT_SOURCE_DIR}/cmp0022.h" + "${CMAKE_CURRENT_BINARY_DIR}/cmp0022_export.h" + DESTINATION include/cmp0022 +) + +set_property(TARGET testLib2 APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USING_TESTLIB2) +set_property(TARGET testLib3 APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USING_TESTLIB3) + +set_property(TARGET cmp0022NEW APPEND PROPERTY INTERFACE_LINK_LIBRARIES testLib2) +# set_property(TARGET cmp0022NEW APPEND PROPERTY LINK_INTERFACE_LIBRARIES testLibIncludeRequired2) # TODO: Test for error +set_property(TARGET cmp0022OLD APPEND PROPERTY INTERFACE_LINK_LIBRARIES testLib2) +set_property(TARGET cmp0022OLD APPEND PROPERTY LINK_INTERFACE_LIBRARIES testLib3) + install(TARGETS testLibRequired testLibIncludeRequired1 testLibIncludeRequired2 @@ -276,6 +303,7 @@ install( testExe2lib testLib4lib testLib4libdbg testLib4libopt testLib6 testLibCycleA testLibCycleB + cmp0022NEW cmp0022OLD EXPORT exp RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP @@ -319,6 +347,7 @@ add_subdirectory(sublib) # For CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE test. export(TARGETS testExe1 testLib1 testLib2 testLib3 testExe2libImp testLib3Imp testLib3ImpDep subdirlib testSharedLibRequired testSharedLibDepends renamed_on_export + cmp0022NEW cmp0022OLD NAMESPACE bld_ FILE ExportBuildTree.cmake ) diff --git a/Tests/ExportImport/Export/cmp0022.cpp b/Tests/ExportImport/Export/cmp0022.cpp new file mode 100644 index 0000000..bef8e61 --- /dev/null +++ b/Tests/ExportImport/Export/cmp0022.cpp @@ -0,0 +1,7 @@ + +#include "cmp0022.h" + +int cmp0022() +{ + return 0; +} diff --git a/Tests/ExportImport/Export/cmp0022.h b/Tests/ExportImport/Export/cmp0022.h new file mode 100644 index 0000000..32bf71a --- /dev/null +++ b/Tests/ExportImport/Export/cmp0022.h @@ -0,0 +1,4 @@ + +#include "cmp0022_export.h" + +int CMP0022_EXPORT cmp0022(); diff --git a/Tests/ExportImport/Export/cmp0022_vs6_1.cpp b/Tests/ExportImport/Export/cmp0022_vs6_1.cpp new file mode 100644 index 0000000..a6ec838 --- /dev/null +++ b/Tests/ExportImport/Export/cmp0022_vs6_1.cpp @@ -0,0 +1 @@ +#include "cmp0022.cpp" diff --git a/Tests/ExportImport/Export/cmp0022_vs6_2.cpp b/Tests/ExportImport/Export/cmp0022_vs6_2.cpp new file mode 100644 index 0000000..a6ec838 --- /dev/null +++ b/Tests/ExportImport/Export/cmp0022_vs6_2.cpp @@ -0,0 +1 @@ +#include "cmp0022.cpp" |