summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/IfTest.cmake.in
diff options
context:
space:
mode:
authorModestas Vainius <modax@debian.org>2013-06-03 14:42:12 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2013-06-03 14:51:21 (GMT)
commitc9b75dcd734e2dd09eadbd9b16a6497bae95941c (patch)
treebc56930440882ccfb239573521f554bf438fe44d /Tests/CMakeTests/IfTest.cmake.in
parent5dd8c01429da90a7417b72f17e784cc98f70f57c (diff)
downloadCMake-c9b75dcd734e2dd09eadbd9b16a6497bae95941c.zip
CMake-c9b75dcd734e2dd09eadbd9b16a6497bae95941c.tar.gz
CMake-c9b75dcd734e2dd09eadbd9b16a6497bae95941c.tar.bz2
Fix test failures caused by regexp-sensitive characters in the build paths
Checkout [1] as an example of the test failures. In that particular cases, the failures is caused by the plus sign in the path being pass unescaped (buildd-cmake_2.8.9-1~bpo60+1-armel-3Lvkef) to the regexp. In addition to failures in the log, the following new tests also fail in 2.8.11: 243 - CTestTestMemcheckUnknown (Failed) 244 - CTestTestMemcheckUnknownQuoted (Failed) 248 - CTestTestMemcheckDummyValgrindFailPre (Failed) 249 - CTestTestMemcheckDummyValgrindFailPost (Failed) 250 - CTestTestMemcheckDummyPurify (Failed) 251 - CTestTestMemcheckDummyBC (Failed) 253 - CMake.List (Failed) [1] https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=armel&ver=2.8.9-1~bpo60%2B1&stamp=1369243896
Diffstat (limited to 'Tests/CMakeTests/IfTest.cmake.in')
-rw-r--r--Tests/CMakeTests/IfTest.cmake.in5
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