diff options
author | Brad King <brad.king@kitware.com> | 2018-01-25 13:30:55 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-25 13:31:03 (GMT) |
commit | 03050c5689f5b6bd91b378316a919018629133fc (patch) | |
tree | 79bb6290d068fd62e9315377f5f7a6a6111493d7 /Tests | |
parent | 312512e2baa608e0eaaaa893114f07e40044f8b2 (diff) | |
parent | 2d64f9f08dab62a3aa2215e0ed8f3dd8bcdc1fbf (diff) | |
download | CMake-03050c5689f5b6bd91b378316a919018629133fc.zip CMake-03050c5689f5b6bd91b378316a919018629133fc.tar.gz CMake-03050c5689f5b6bd91b378316a919018629133fc.tar.bz2 |
Merge topic 'fix-include_regular_expression-subdir'
2d64f9f0 include_regular_expression: Fix propagation to subdirectories
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1690
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/Make/IncludeRegexSubdir-check.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/Make/IncludeRegexSubdir.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/Make/IncludeRegexSubdir/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Make/RunCMakeTest.cmake | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/Make/IncludeRegexSubdir-check.cmake b/Tests/RunCMake/Make/IncludeRegexSubdir-check.cmake new file mode 100644 index 0000000..dbdf7be --- /dev/null +++ b/Tests/RunCMake/Make/IncludeRegexSubdir-check.cmake @@ -0,0 +1,4 @@ +include("${RunCMake_TEST_BINARY_DIR}/IncludeRegexSubdir/CMakeFiles/CMakeDirectoryInformation.cmake" OPTIONAL) +if(NOT CMAKE_C_INCLUDE_REGEX_SCAN STREQUAL "^custom_include_regex$") + set(RunCMake_TEST_FAILED "CMAKE_C_INCLUDE_REGEX_SCAN has unexpected value:\n \"${CMAKE_C_INCLUDE_REGEX_SCAN}\"") +endif() diff --git a/Tests/RunCMake/Make/IncludeRegexSubdir.cmake b/Tests/RunCMake/Make/IncludeRegexSubdir.cmake new file mode 100644 index 0000000..a7a93a0 --- /dev/null +++ b/Tests/RunCMake/Make/IncludeRegexSubdir.cmake @@ -0,0 +1,3 @@ +enable_language(C) +include_regular_expression("^custom_include_regex$") +add_subdirectory(IncludeRegexSubdir) diff --git a/Tests/RunCMake/Make/IncludeRegexSubdir/CMakeLists.txt b/Tests/RunCMake/Make/IncludeRegexSubdir/CMakeLists.txt new file mode 100644 index 0000000..e712aea --- /dev/null +++ b/Tests/RunCMake/Make/IncludeRegexSubdir/CMakeLists.txt @@ -0,0 +1 @@ +# We only need this directory to be processed. No targets needed. diff --git a/Tests/RunCMake/Make/RunCMakeTest.cmake b/Tests/RunCMake/Make/RunCMakeTest.cmake index 869d11e..3b2b8f5 100644 --- a/Tests/RunCMake/Make/RunCMakeTest.cmake +++ b/Tests/RunCMake/Make/RunCMakeTest.cmake @@ -17,3 +17,4 @@ run_TargetMessages(VAR-ON -DCMAKE_TARGET_MESSAGES=ON) run_TargetMessages(VAR-OFF -DCMAKE_TARGET_MESSAGES=OFF) run_cmake(CustomCommandDepfile-ERROR) +run_cmake(IncludeRegexSubdir) |