diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 17:50:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 18:19:16 (GMT) |
commit | 9db3116226cb99fcf54e936c833953abcde9b729 (patch) | |
tree | bd755ed9e616bbf1482a894bc7946980d81b7703 /Tests/Properties | |
parent | 77543bde41b0e52c3959016698b529835945d62d (diff) | |
download | CMake-9db3116226cb99fcf54e936c833953abcde9b729.zip CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2 |
Remove CMake-language block-end command arguments
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
Diffstat (limited to 'Tests/Properties')
-rw-r--r-- | Tests/Properties/CMakeLists.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt index ed6d2d4..7bf9c2d 100644 --- a/Tests/Properties/CMakeLists.txt +++ b/Tests/Properties/CMakeLists.txt @@ -27,7 +27,7 @@ get_property(GLOBALRESULT GLOBAL PROPERTY GLOBALTEST DEFINED) if (GLOBALRESULT) message(SEND_ERROR "Error: global prop defined when it should not be, " "result is GLOBALRESULT=${GLOBALRESULT}") -endif (GLOBALRESULT) +endif () define_property(GLOBAL PROPERTY GLOBALTEST BRIEF_DOCS "A test property" @@ -38,7 +38,7 @@ get_property(GLOBALRESULT GLOBAL PROPERTY GLOBALTEST DEFINED) if (NOT GLOBALRESULT) message(SEND_ERROR "Error: global prop not defined " "result is GLOBALRESULT=${GLOBALRESULT}") -endif (NOT GLOBALRESULT) +endif () set_property(GLOBAL PROPERTY GLOBALTEST 1) set_property(DIRECTORY PROPERTY DIRECTORYTEST 1) @@ -69,7 +69,7 @@ get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST) if (NOT TARGETRESULT) message(SEND_ERROR "Error: target result is TARGETRESULT=${TARGETRESULT}") -endif (NOT TARGETRESULT) +endif () # test APPEND and APPEND_STRING set_property() set_property(TARGET Properties PROPERTY FOO foo) @@ -94,7 +94,7 @@ get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST SET) if (NOT TARGETRESULT) message(SEND_ERROR "Error: target prop not set, result is TARGETRESULT=${TARGETRESULT}") -endif (NOT TARGETRESULT) +endif () # test unsetting a property set_property(TARGET Properties PROPERTY TARGETTEST) @@ -102,7 +102,7 @@ get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST SET) if (TARGETRESULT) message(SEND_ERROR "Error: target prop not unset, " "result is TARGETRESULT=${TARGETRESULT}") -endif (TARGETRESULT) +endif () @@ -114,7 +114,7 @@ if(NOT RESULT4) message(SEND_ERROR "Error: target result is" " RESULT4=${RESULT4}" " Properties_SOURCES=[${Properties_SOURCES}]") -endif(NOT RESULT4) +endif() # test CACHE properties macro(check_cache_props) @@ -123,8 +123,8 @@ macro(check_cache_props) if(NOT "x${result}" STREQUAL "x${expect_${prop}}") message(SEND_ERROR "CACHE property ${prop} is [${result}], not [${expect_${prop}}]") endif() - endforeach(prop) -endmacro(check_cache_props) + endforeach() +endmacro() set(expect_VALUE "ON") set(expect_TYPE "BOOL") set(expect_HELPSTRING "sample cache entry") |