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
This commit is contained in:
Kitware Robot
2012-08-13 13:50:14 -04:00
committed by Brad King
parent 77543bde41
commit 9db3116226
385 changed files with 4107 additions and 4107 deletions

View File

@@ -28,7 +28,7 @@ function(WRITE_BASIC_CONFIG_VERSION_FILE _filename)
if(CVF_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to WRITE_BASIC_CONFIG_VERSION_FILE(): \"${CVF_UNPARSED_ARGUMENTS}\"")
endif(CVF_UNPARSED_ARGUMENTS)
endif()
set(versionTemplateFile "${CMAKE_ROOT}/Modules/BasicConfigVersion-${CVF_COMPATIBILITY}.cmake.in")
if(NOT EXISTS "${versionTemplateFile}")
@@ -41,4 +41,4 @@ function(WRITE_BASIC_CONFIG_VERSION_FILE _filename)
configure_file("${versionTemplateFile}" "${_filename}" @ONLY)
endfunction(WRITE_BASIC_CONFIG_VERSION_FILE)
endfunction()