diff options
author | Brad King <brad.king@kitware.com> | 2013-05-31 13:33:26 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-05-31 13:33:26 (GMT) |
commit | 69cc67611ad1745f37d61361b931c1bc2ca0596c (patch) | |
tree | d8ba78291328aa979b8e9f22dbea322b69e46b10 /Tests/IncludeDirectories | |
parent | 7b8a4c3e6f04879bb47ad99a93d2a748b5ac4406 (diff) | |
parent | 07f9e157b61a419c04e31589c82eb284654a2b4e (diff) | |
download | CMake-69cc67611ad1745f37d61361b931c1bc2ca0596c.zip CMake-69cc67611ad1745f37d61361b931c1bc2ca0596c.tar.gz CMake-69cc67611ad1745f37d61361b931c1bc2ca0596c.tar.bz2 |
Merge topic 'test-INCLUDE_DIRECTORIES-genex-read'
07f9e15 GenexEval: Test evaluation of INCLUDE_DIRECTORIES target property.
Diffstat (limited to 'Tests/IncludeDirectories')
3 files changed, 33 insertions, 0 deletions
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt index 50f12ee..088725b 100644 --- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt @@ -110,6 +110,25 @@ set_property(TARGET libbad APPEND PROPERTY ) +add_library(includes_source_good empty.cpp) +target_include_directories(includes_source_good + INTERFACE + "${CMAKE_CURRENT_BINARY_DIR}/good" + "${CMAKE_CURRENT_BINARY_DIR}/othergood/" +) +add_library(includes_source_bad empty.cpp) +target_include_directories(includes_source_bad + INTERFACE + "${CMAKE_CURRENT_BINARY_DIR}/bad" +) + +add_library(includes_proxy SHARED empty.cpp) +target_link_libraries(includes_proxy includes_source_good) +target_link_libraries(includes_proxy LINK_INTERFACE_LIBRARIES includes_source_bad) +add_executable(copy_includes copy_includes.cpp) +target_include_directories(copy_includes PRIVATE $<TARGET_PROPERTY:includes_proxy,INCLUDE_DIRECTORIES>) + + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lib5.cpp" "#include \"common.h\"\n") add_library(lib5 "${CMAKE_CURRENT_BINARY_DIR}/lib5.cpp") diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp b/Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp new file mode 100644 index 0000000..fed4c03 --- /dev/null +++ b/Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp @@ -0,0 +1,7 @@ + +#include "common.h" + +int main() +{ + return 0; +} diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/empty.cpp b/Tests/IncludeDirectories/TargetIncludeDirectories/empty.cpp new file mode 100644 index 0000000..7279c5e --- /dev/null +++ b/Tests/IncludeDirectories/TargetIncludeDirectories/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty(void) +{ + return 0; +} |