diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-11 23:00:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-15 19:36:22 (GMT) |
commit | 1d47cd94f3748d287f676f3847d42f3674062dcd (patch) | |
tree | 7851471039a4b5e76ba876a423b250e2f4f77e45 /Tests/ExportImport/Import | |
parent | 6c828f9126453d27c45e1ca6113602fe9df8cbe2 (diff) | |
download | CMake-1d47cd94f3748d287f676f3847d42f3674062dcd.zip CMake-1d47cd94f3748d287f676f3847d42f3674062dcd.tar.gz CMake-1d47cd94f3748d287f676f3847d42f3674062dcd.tar.bz2 |
Add a test for the interfaces in targets exported from the build tree.
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r-- | Tests/ExportImport/Import/A/CMakeLists.txt | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index abb2ab0..6a2e54c 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -159,22 +159,19 @@ endif() add_executable(deps_iface deps_iface.c) target_link_libraries(deps_iface testLibDepends) -set_property(TARGET deps_iface APPEND PROPERTY - COMPILE_DEFINITIONS - $<TARGET_PROPERTY:testLibDepends,INTERFACE_COMPILE_DEFINITIONS> -) -set_property(TARGET deps_iface APPEND PROPERTY - INCLUDE_DIRECTORIES - $<TARGET_PROPERTY:testLibDepends,INTERFACE_INCLUDE_DIRECTORIES> -) +target_include_directories(deps_iface PRIVATE testLibDepends) +target_compile_definitions(deps_iface PRIVATE testLibDepends) add_executable(deps_shared_iface deps_shared_iface.cpp) target_link_libraries(deps_shared_iface testSharedLibDepends) -set_property(TARGET deps_shared_iface APPEND PROPERTY - COMPILE_DEFINITIONS - $<TARGET_PROPERTY:testSharedLibDepends,INTERFACE_COMPILE_DEFINITIONS> -) -set_property(TARGET deps_shared_iface APPEND PROPERTY - INCLUDE_DIRECTORIES - $<TARGET_PROPERTY:testSharedLibDepends,INTERFACE_INCLUDE_DIRECTORIES> -) +target_include_directories(deps_shared_iface PRIVATE testSharedLibDepends) +target_compile_definitions(deps_shared_iface PRIVATE testSharedLibDepends) + +#----------------------------------------------------------------------------- +# Test that targets imported from the build tree have their dependencies +# evaluated correctly. The above already tests the same for the install tree. + +add_executable(deps_shared_iface2 deps_shared_iface.cpp) +target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends) +target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends) +target_compile_definitions(deps_shared_iface2 PRIVATE bld_testSharedLibDepends) |