summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-21 17:42:04 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-21 19:21:37 (GMT)
commita4bd30104fe6df3e4a6a37d0abb640a28126009d (patch)
treeedcdb3e712d43718eb16b9f2b8fdeb5a556a9f2f /Tests
parent86bb2ce75793ff12905596edc83ecabf2bce22df (diff)
downloadCMake-a4bd30104fe6df3e4a6a37d0abb640a28126009d.zip
CMake-a4bd30104fe6df3e4a6a37d0abb640a28126009d.tar.gz
CMake-a4bd30104fe6df3e4a6a37d0abb640a28126009d.tar.bz2
include_directories: Fix regression in BEFORE option (#15693)
Refactoring in commit 6ed9c7e0 (cmState: Host buildsystem properties for directories, 2015-07-18) broke include_directories(BEFORE). Fix it and add a test case.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt1
-rw-r--r--Tests/RunCMake/include_directories/DirectoryBefore.cmake4
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake1
3 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt b/Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt
new file mode 100644
index 0000000..e986082
--- /dev/null
+++ b/Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt
@@ -0,0 +1 @@
+-- INCLUDE_DIRECTORIES: '[^;]*/Tests/RunCMake/include_directories/BeforeDir;[^;]*/Tests/RunCMake/include_directories/AfterDir'
diff --git a/Tests/RunCMake/include_directories/DirectoryBefore.cmake b/Tests/RunCMake/include_directories/DirectoryBefore.cmake
new file mode 100644
index 0000000..be3f663
--- /dev/null
+++ b/Tests/RunCMake/include_directories/DirectoryBefore.cmake
@@ -0,0 +1,4 @@
+include_directories(AfterDir)
+include_directories(BEFORE BeforeDir)
+get_property(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
+message(STATUS "INCLUDE_DIRECTORIES: '${dirs}'")
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index 54d5e97..57e8274 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -5,6 +5,7 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefa
run_cmake(NotFoundContent)
run_cmake(DebugIncludes)
+run_cmake(DirectoryBefore)
run_cmake(TID-bad-target)
run_cmake(ImportedTarget)
run_cmake(CMP0021)