diff options
author | Brad King <brad.king@kitware.com> | 2013-02-25 18:12:12 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-02-25 18:12:12 (GMT) |
commit | 57072c12d2e9302cefa66c96e55a595de085a161 (patch) | |
tree | 8c41b27c68aab8dfbd9ab75b2eab1e3028c4f9ed /Tests | |
parent | 990c440ddd599d0bf4cad2cb7ac1688a42dca6d9 (diff) | |
parent | 8dfdf1c734af19a1e49efa4568e5e1f8fc7cb2f2 (diff) | |
download | CMake-57072c12d2e9302cefa66c96e55a595de085a161.zip CMake-57072c12d2e9302cefa66c96e55a595de085a161.tar.gz CMake-57072c12d2e9302cefa66c96e55a595de085a161.tar.bz2 |
Merge topic 'interface-property-external-read'
8dfdf1c Fix the tests for evaluating includes and defines.
98a6725 Fix constness of accessors.
7e70744 Expand includes and defines transitively in 'external' genexes.
d1a2729 Fix DAG checker finding cycling dependencies.
e72eaad Workaround broken code where a target has itself in its link iface.
ec2c67b Strip stray semicolons when evaluating generator expressions.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/GeneratorExpression/CMakeLists.txt | 31 | ||||
-rw-r--r-- | Tests/GeneratorExpression/check-part2.cmake | 8 | ||||
-rw-r--r-- | Tests/GeneratorExpression/empty.cpp | 2 |
3 files changed, 40 insertions, 1 deletions
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index ecbbedf..fff7c87 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 2.8.8) -project(GeneratorExpression NONE) +project(GeneratorExpression CXX) add_custom_target(check-part1 ALL COMMAND ${CMAKE_COMMAND} @@ -62,6 +62,27 @@ add_custom_target(check-part1 ALL VERBATIM ) +add_library(empty1 empty.cpp) +target_include_directories(empty1 PUBLIC /empty1/public) +target_include_directories(empty1 PRIVATE /empty1/private) + +add_library(empty2 empty.cpp) +target_include_directories(empty2 PUBLIC /empty2/public) + +add_library(empty3 empty.cpp) +target_include_directories(empty3 PUBLIC /empty3/public) +target_include_directories(empty3 PRIVATE /empty3/private) + +add_library(empty4 empty.cpp) +target_include_directories(empty4 PUBLIC /empty4/public) + +target_link_libraries(empty1 LINK_PUBLIC empty2) +target_link_libraries(empty2 LINK_PUBLIC empty3 empty4) +target_link_libraries(empty3 LINK_PUBLIC empty2 empty4) + +add_library(empty5 empty.cpp) +target_include_directories(empty5 PRIVATE /empty5/private1 /empty5/private2) + add_custom_target(check-part2 ALL COMMAND ${CMAKE_COMMAND} -Dtest_incomplete_1=$< @@ -89,6 +110,14 @@ add_custom_target(check-part2 ALL -Dtest_install_interface=$<INSTALL_INTERFACE:install> -Dtest_target_name_1=$<TARGET_NAME:tgt,ok> -Dtest_target_name_2=$<TARGET_NAME:tgt:ok> + -Dtest_target_includes1=$<TARGET_PROPERTY:empty1,INTERFACE_INCLUDE_DIRECTORIES> + -Dtest_target_includes2=$<TARGET_PROPERTY:empty2,INTERFACE_INCLUDE_DIRECTORIES> + -Dtest_target_includes3=$<TARGET_PROPERTY:empty3,INTERFACE_INCLUDE_DIRECTORIES> + -Dtest_target_includes4=$<TARGET_PROPERTY:empty1,INCLUDE_DIRECTORIES> + -Dtest_target_includes5=$<TARGET_PROPERTY:empty2,INCLUDE_DIRECTORIES> + -Dtest_target_includes6=$<TARGET_PROPERTY:empty3,INCLUDE_DIRECTORIES> + -Dtest_target_includes7=$<TARGET_PROPERTY:empty1,INTERFACE_INCLUDE_DIRECTORIES> + -Dtest_target_includes8=$<TARGET_PROPERTY:empty5,INCLUDE_DIRECTORIES> -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part2.cmake COMMAND ${CMAKE_COMMAND} -E echo "check done (part 2 of 2)" VERBATIM diff --git a/Tests/GeneratorExpression/check-part2.cmake b/Tests/GeneratorExpression/check-part2.cmake index 8855a97..3f7187c 100644 --- a/Tests/GeneratorExpression/check-part2.cmake +++ b/Tests/GeneratorExpression/check-part2.cmake @@ -26,3 +26,11 @@ check(test_build_interface "build") check(test_install_interface "") check(test_target_name_1 "tgt,ok") check(test_target_name_2 "tgt:ok") +check(test_target_includes1 "/empty1/public;/empty2/public;/empty3/public;/empty4/public") +check(test_target_includes2 "/empty2/public;/empty3/public;/empty4/public") +check(test_target_includes3 "/empty3/public;/empty2/public;/empty4/public") +check(test_target_includes4 "/empty1/public;/empty1/private;/empty2/public;/empty3/public;/empty4/public") +check(test_target_includes5 "/empty2/public;/empty3/public;/empty2/public;/empty4/public") +check(test_target_includes6 "/empty3/public;/empty3/private;/empty2/public;/empty3/public;/empty4/public") +check(test_target_includes7 "/empty1/public;/empty2/public;/empty3/public;/empty4/public") +check(test_target_includes8 "/empty5/private1;/empty5/private2") diff --git a/Tests/GeneratorExpression/empty.cpp b/Tests/GeneratorExpression/empty.cpp new file mode 100644 index 0000000..c539901 --- /dev/null +++ b/Tests/GeneratorExpression/empty.cpp @@ -0,0 +1,2 @@ + +// empty |