Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full 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
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
and which is more useful, because then you can also access the item behind
the one you were looking, useful for writing macros with optional keywords
with parameters
Alex