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 /Modules/FindSubversion.cmake | |
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 'Modules/FindSubversion.cmake')
-rw-r--r-- | Modules/FindSubversion.cmake | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake index 85c5105..f1bfc75 100644 --- a/Modules/FindSubversion.cmake +++ b/Modules/FindSubversion.cmake @@ -31,7 +31,7 @@ # message("Current revision is ${Project_WC_REVISION}") # Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) # message("Last changed log is ${Project_LAST_CHANGED_LOG}") -# endif(SUBVERSION_FOUND) +# endif() #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -81,7 +81,7 @@ if(Subversion_SVN_EXECUTABLE) if(NOT ${Subversion_svn_info_result} EQUAL 0) message(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}") - else(NOT ${Subversion_svn_info_result} EQUAL 0) + else() string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}") @@ -96,12 +96,12 @@ if(Subversion_SVN_EXECUTABLE) string(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*" "\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}") - endif(NOT ${Subversion_svn_info_result} EQUAL 0) + endif() # restore the previous LC_ALL set(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL}) - endmacro(Subversion_WC_INFO) + endmacro() macro(Subversion_WC_LOG dir prefix) # This macro can block if the certificate is not signed: @@ -117,10 +117,10 @@ if(Subversion_SVN_EXECUTABLE) if(NOT ${Subversion_svn_log_result} EQUAL 0) message(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}") - endif(NOT ${Subversion_svn_log_result} EQUAL 0) - endmacro(Subversion_WC_LOG) + endif() + endmacro() -endif(Subversion_SVN_EXECUTABLE) +endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Subversion REQUIRED_VARS Subversion_SVN_EXECUTABLE |