summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-26 14:56:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-03-26 14:56:34 (GMT)
commit8494bc271399cf4e474f640fde08e6cd61d932da (patch)
treee573849e5ab99a0f5a013032332c25421a7a2e5f /Tests
parentdb20cb2f9f2ff1d00593e0fc921184d99f58749a (diff)
parent588fa1bb9eed6e838f58d4f1fb1d01d83ecfd820 (diff)
downloadCMake-8494bc271399cf4e474f640fde08e6cd61d932da.zip
CMake-8494bc271399cf4e474f640fde08e6cd61d932da.tar.gz
CMake-8494bc271399cf4e474f640fde08e6cd61d932da.tar.bz2
Merge topic 'toolchain-include_directories'
588fa1bb9e Restore support for include_directories() in toolchain files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3140
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/ToolchainFile/IncludeDirectories-toolchain.cmake1
-rw-r--r--Tests/RunCMake/ToolchainFile/IncludeDirectories.c5
-rw-r--r--Tests/RunCMake/ToolchainFile/IncludeDirectories.cmake2
-rw-r--r--Tests/RunCMake/ToolchainFile/IncludeDirectories/IncDir.h1
-rw-r--r--Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake8
5 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/ToolchainFile/IncludeDirectories-toolchain.cmake b/Tests/RunCMake/ToolchainFile/IncludeDirectories-toolchain.cmake
new file mode 100644
index 0000000..e77e9fe
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/IncludeDirectories-toolchain.cmake
@@ -0,0 +1 @@
+include_directories(${CMAKE_CURRENT_LIST_DIR}/IncludeDirectories)
diff --git a/Tests/RunCMake/ToolchainFile/IncludeDirectories.c b/Tests/RunCMake/ToolchainFile/IncludeDirectories.c
new file mode 100644
index 0000000..81b2465
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/IncludeDirectories.c
@@ -0,0 +1,5 @@
+#include <IncDir.h>
+
+void IncDir(void)
+{
+}
diff --git a/Tests/RunCMake/ToolchainFile/IncludeDirectories.cmake b/Tests/RunCMake/ToolchainFile/IncludeDirectories.cmake
new file mode 100644
index 0000000..616cff4
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/IncludeDirectories.cmake
@@ -0,0 +1,2 @@
+enable_language(C)
+add_library(IncDir STATIC IncludeDirectories.c)
diff --git a/Tests/RunCMake/ToolchainFile/IncludeDirectories/IncDir.h b/Tests/RunCMake/ToolchainFile/IncludeDirectories/IncDir.h
new file mode 100644
index 0000000..bca9c2c
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/IncludeDirectories/IncDir.h
@@ -0,0 +1 @@
+/* IncDir.h */
diff --git a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
index 8a20200..7eb4485 100644
--- a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
@@ -9,3 +9,11 @@ run_cmake_toolchain(CallEnableLanguage)
run_cmake_toolchain(CallProject)
run_cmake_toolchain(FlagsInit)
run_cmake_toolchain(LinkFlagsInit)
+
+function(run_IncludeDirectories)
+ run_cmake_toolchain(IncludeDirectories)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/IncludeDirectories-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(IncludeDirectories-build ${CMAKE_COMMAND} --build . --config Debug)
+endfunction()
+run_IncludeDirectories()