summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands/target_include_directories
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeCommands/target_include_directories')
-rw-r--r--Tests/CMakeCommands/target_include_directories/CMakeLists.txt3
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.cpp5
-rw-r--r--Tests/CMakeCommands/target_include_directories/relative_dir/consumer/consumer.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index 21b8e15..8a564c7 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -45,7 +45,8 @@ add_executable(consumer
target_include_directories(consumer
PRIVATE
$<TARGET_PROPERTY:target_include_directories,INTERFACE_INCLUDE_DIRECTORIES>
- relative_dir
+ relative_dir
+ relative_dir/$<TARGET_PROPERTY:NAME>
)
# Test no items
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp
index 82b800a..7e3443e 100644
--- a/Tests/CMakeCommands/target_include_directories/consumer.cpp
+++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp
@@ -3,6 +3,7 @@
#include "publicinclude.h"
#include "interfaceinclude.h"
#include "relative_dir.h"
+#include "consumer.h"
#ifdef PRIVATEINCLUDE_DEFINE
#error Unexpected PRIVATEINCLUDE_DEFINE
@@ -24,4 +25,8 @@
#error Expected RELATIVE_DIR_DEFINE
#endif
+#ifndef CONSUMER_DEFINE
+#error Expected CONSUMER_DEFINE
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/relative_dir/consumer/consumer.h b/Tests/CMakeCommands/target_include_directories/relative_dir/consumer/consumer.h
new file mode 100644
index 0000000..b915373
--- /dev/null
+++ b/Tests/CMakeCommands/target_include_directories/relative_dir/consumer/consumer.h
@@ -0,0 +1,2 @@
+
+#define CONSUMER_DEFINE