summaryrefslogtreecommitdiffstats
path: root/Tests/IncludeDirectories
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-08-09 20:24:34 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-11 12:53:00 (GMT)
commit5790aca4adfc21e9e042e93fa0dd290aab91be5c (patch)
tree96a242e06972a3d449534f17d3f8b56f85c76183 /Tests/IncludeDirectories
parent422d3f68de6bfa5c3fad68d2b030f2a618a821a2 (diff)
downloadCMake-5790aca4adfc21e9e042e93fa0dd290aab91be5c.zip
CMake-5790aca4adfc21e9e042e93fa0dd290aab91be5c.tar.gz
CMake-5790aca4adfc21e9e042e93fa0dd290aab91be5c.tar.bz2
target_include_directories: Support relative SYSTEM include dirs (#15464)
Diffstat (limited to 'Tests/IncludeDirectories')
-rw-r--r--Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
index 0215e93..dcee85e 100644
--- a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
@@ -35,6 +35,16 @@ add_library(imported_consumer2 imported_consumer.cpp)
target_link_libraries(imported_consumer2 imported_consumer)
target_compile_options(imported_consumer2 PRIVATE -Werror=unused-variable)
+# add a target which has a relative system include
+add_library(somelib imported_consumer.cpp)
+target_include_directories(somelib SYSTEM PUBLIC "systemlib_header_only")
+target_compile_options(somelib PRIVATE -Werror=unused-variable)
+
+# add a target which consumes a relative system include
+add_library(otherlib upstream.cpp)
+target_link_libraries(otherlib PUBLIC somelib)
+target_compile_options(somelib PRIVATE -Werror=unused-variable)
+
macro(do_try_compile error_option)
set(TC_ARGS
IFACE_TRY_COMPILE_${error_option}