summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-23 15:50:31 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-23 15:50:31 (GMT)
commit154bf8da991a6cbc82e5ef89979549b10d19f561 (patch)
treedc4b59001104176963bb10836f8191bbce768bb4 /Tests
parent103f77e5122edf60b51e5c49af9231b657eed300 (diff)
parent85857e6d1c1859bdc8ab4206e0329e846b6ef020 (diff)
downloadCMake-154bf8da991a6cbc82e5ef89979549b10d19f561.zip
CMake-154bf8da991a6cbc82e5ef89979549b10d19f561.tar.gz
CMake-154bf8da991a6cbc82e5ef89979549b10d19f561.tar.bz2
Merge topic 'INTERFACE_SYSTEM_INCLUDE_DIRECTORIES-update'
85857e6d Help: Clarify INTERFACE_SYSTEM_INCLUDE_DIRECTORIES documentation. ee38062b IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt8
-rw-r--r--Tests/IncludeDirectories/SystemIncludeDirectories/config_specific/config_iface.h14
-rw-r--r--Tests/IncludeDirectories/SystemIncludeDirectories/consumer.cpp2
3 files changed, 23 insertions, 1 deletions
diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
index abe9f74..0215e93 100644
--- a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
@@ -14,8 +14,14 @@ target_include_directories(upstream SYSTEM PUBLIC
$<TARGET_PROPERTY:systemlib,INTERFACE_INCLUDE_DIRECTORIES>
)
+add_library(config_specific INTERFACE)
+set(testConfig ${CMAKE_BUILD_TYPE})
+target_include_directories(config_specific SYSTEM INTERFACE
+ "$<$<CONFIG:${testConfig}>:${CMAKE_CURRENT_SOURCE_DIR}/config_specific>"
+)
+
add_library(consumer consumer.cpp)
-target_link_libraries(consumer upstream)
+target_link_libraries(consumer upstream config_specific)
target_compile_options(consumer PRIVATE -Werror=unused-variable)
add_library(iface IMPORTED INTERFACE)
diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/config_specific/config_iface.h b/Tests/IncludeDirectories/SystemIncludeDirectories/config_specific/config_iface.h
new file mode 100644
index 0000000..05d3604
--- /dev/null
+++ b/Tests/IncludeDirectories/SystemIncludeDirectories/config_specific/config_iface.h
@@ -0,0 +1,14 @@
+
+#ifndef CONFIG_IFACE_H
+#define CONFIG_IFACE_H
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int configUnusedFunc()
+{
+ int unused;
+ return 0;
+}
+
+#endif
diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/consumer.cpp b/Tests/IncludeDirectories/SystemIncludeDirectories/consumer.cpp
index 197dae8..be18ebf 100644
--- a/Tests/IncludeDirectories/SystemIncludeDirectories/consumer.cpp
+++ b/Tests/IncludeDirectories/SystemIncludeDirectories/consumer.cpp
@@ -1,6 +1,8 @@
#include "upstream.h"
+#include "config_iface.h"
+
int consumer()
{
return upstream();