diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 13:50:14 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 14:19:16 -0400 |
commit | 9db3116226cb99fcf54e936c833953abcde9b729 (patch) | |
tree | bd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/CMakeDetermineCompilerABI.cmake | |
parent | 77543bde41b0e52c3959016698b529835945d62d (diff) | |
download | cmake-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/CMakeDetermineCompilerABI.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerABI.cmake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index b79afdf54e..ae2eb9b236 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -49,21 +49,21 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) foreach(info ${ABI_STRINGS}) if("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*") string(REGEX REPLACE ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*" "\\1" ABI_SIZEOF_DPTR "${info}") - endif("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*") + endif() if("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*") string(REGEX REPLACE ".*INFO:abi\\[([^]]*)\\].*" "\\1" ABI_NAME "${info}") - endif("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*") - endforeach(info) + endif() + endforeach() if(ABI_SIZEOF_DPTR) set(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE) elseif(CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT) set(CMAKE_${lang}_SIZEOF_DATA_PTR "${CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT}" PARENT_SCOPE) - endif(ABI_SIZEOF_DPTR) + endif() if(ABI_NAME) set(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE) - endif(ABI_NAME) + endif() # Parse implicit linker information for this language, if available. set(implicit_dirs "") @@ -122,10 +122,10 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) endforeach() endif() - else(CMAKE_DETERMINE_${lang}_ABI_COMPILED) + else() message(STATUS "Detecting ${lang} compiler ABI info - failed") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n") - endif(CMAKE_DETERMINE_${lang}_ABI_COMPILED) - endif(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED) -endfunction(CMAKE_DETERMINE_COMPILER_ABI) + endif() + endif() +endfunction() |