summaryrefslogtreecommitdiff
path: root/Modules/FindSubversion.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 13:50:14 -0400
committerBrad King <brad.king@kitware.com>2012-08-13 14:19:16 -0400
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/FindSubversion.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadcmake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
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.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index 85c51059cb..f1bfc75bca 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