summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-29 16:23:31 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-29 18:34:04 (GMT)
commit7bf490e9bb6128082aa178f28691b3fc418322fe (patch)
treea8f701d2db9a3960cceb1596705906c19ba42df4 /Tests/CMakeCommands
parentf6b16d4b0642d26111cddff714b464e22b715482 (diff)
downloadCMake-7bf490e9bb6128082aa178f28691b3fc418322fe.zip
CMake-7bf490e9bb6128082aa178f28691b3fc418322fe.tar.gz
CMake-7bf490e9bb6128082aa178f28691b3fc418322fe.tar.bz2
Make subclasses responsible for joining content.
This way we can add handling of relative/absolute paths and of -D in compile definitions.
Diffstat (limited to 'Tests/CMakeCommands')
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt1
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.cpp4
-rw-r--r--Tests/CMakeCommands/target_include_directories/CMakeLists.txt1
-rw-r--r--Tests/CMakeCommands/target_include_directories/consumer.cpp5
-rw-r--r--Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h2
5 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index 00cba44..8a4437b 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -20,4 +20,5 @@ target_compile_definitions(consumer
PRIVATE $<TARGET_PROPERTY:target_compile_definitions,INTERFACE_COMPILE_DEFINITIONS>
$<$<TARGET_DEFINED:notdefined>:SHOULD_NOT_BE_DEFINED>
$<$<TARGET_DEFINED:target_compile_definitions>:SHOULD_BE_DEFINED>
+ -DDASH_D_DEFINE
)
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
index f835b6c..1a46aa5 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
@@ -19,4 +19,8 @@
#error Expected SHOULD_BE_DEFINED
#endif
+#ifndef DASH_D_DEFINE
+#error Expected DASH_D_DEFINE
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index 89b61f3..7529283 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -44,4 +44,5 @@ add_executable(consumer
target_include_directories(consumer
PRIVATE $<TARGET_PROPERTY:target_include_directories,INTERFACE_INCLUDE_DIRECTORIES>
+ relative_dir
)
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp
index 5d88488..82b800a 100644
--- a/Tests/CMakeCommands/target_include_directories/consumer.cpp
+++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp
@@ -2,6 +2,7 @@
#include "common.h"
#include "publicinclude.h"
#include "interfaceinclude.h"
+#include "relative_dir.h"
#ifdef PRIVATEINCLUDE_DEFINE
#error Unexpected PRIVATEINCLUDE_DEFINE
@@ -19,4 +20,8 @@
#error Expected CURE_DEFINE
#endif
+#ifndef RELATIVE_DIR_DEFINE
+#error Expected RELATIVE_DIR_DEFINE
+#endif
+
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h b/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h
new file mode 100644
index 0000000..7017b61
--- /dev/null
+++ b/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h
@@ -0,0 +1,2 @@
+
+#define RELATIVE_DIR_DEFINE