diff options
Diffstat (limited to 'Tests/CMakeTests/IfTest.cmake.in')
-rw-r--r-- | Tests/CMakeTests/IfTest.cmake.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/CMakeTests/IfTest.cmake.in b/Tests/CMakeTests/IfTest.cmake.in index 639e226..74b8e32 100644 --- a/Tests/CMakeTests/IfTest.cmake.in +++ b/Tests/CMakeTests/IfTest.cmake.in @@ -7,6 +7,9 @@ foreach(_arg "" 0 1 2 ${TRUE_NAMES} ${FALSE_NAMES}) set(VAR_${_arg} "${_arg}") endforeach() +include("@CMAKE_CURRENT_SOURCE_DIR@/../RegexEscapeString.cmake") +REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") + macro(test_vars _old) # Variables set to false or not set. foreach(_var "" 0 ${FALSE_NAMES} UNDEFINED) @@ -158,7 +161,7 @@ endforeach() test_vars("") set(Invalid-Argument-RESULT 1) -set(Invalid-Argument-STDERR ".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?If-Invalid-Argument.cmake:1 \\(if\\):.*Unknown arguments specified.*") +set(Invalid-Argument-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?If-Invalid-Argument.cmake:1 \\(if\\):.*Unknown arguments specified.*") include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake") check_cmake_test(If |