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 /Tests/CPackComponentsForAll | |
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 'Tests/CPackComponentsForAll')
5 files changed, 24 insertions, 24 deletions
diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt index 5449d09dc8..8162f0c2a6 100644 --- a/Tests/CPackComponentsForAll/CMakeLists.txt +++ b/Tests/CPackComponentsForAll/CMakeLists.txt @@ -118,6 +118,6 @@ if (NOT ("${CPackComponentWay}" STREQUAL "default")) ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake @ONLY) set(CPACK_PROJECT_CONFIG_FILE ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake) -endif (NOT ("${CPackComponentWay}" STREQUAL "default")) +endif () # Include CPack to introduce the appropriate targets include(CPack)
\ No newline at end of file diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in index 1d203c8d82..0bfbf14676 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in @@ -3,15 +3,15 @@ # if(CPACK_GENERATOR MATCHES "ZIP") set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "ZIP") +endif() if(CPACK_GENERATOR MATCHES "RPM") set(CPACK_RPM_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "RPM") +endif() if(CPACK_GENERATOR MATCHES "DEB") set(CPACK_DEB_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "DEB") +endif() # # Choose grouping way diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in index 9444a14734..450c2047e5 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in @@ -3,16 +3,16 @@ # if(CPACK_GENERATOR MATCHES "ZIP") set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "ZIP") +endif() if(CPACK_GENERATOR MATCHES "RPM") set(CPACK_RPM_COMPONENT_INSTALL "ON") set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries") -endif(CPACK_GENERATOR MATCHES "RPM") +endif() if(CPACK_GENERATOR MATCHES "DEB") set(CPACK_DEB_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "DEB") +endif() # # Choose grouping way diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in index 2d251b3637..60bdd06be4 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in @@ -3,20 +3,20 @@ # if(CPACK_GENERATOR MATCHES "ZIP") set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "ZIP") +endif() if(CPACK_GENERATOR MATCHES "RPM") set(CPACK_RPM_COMPONENT_INSTALL "ON") set(CPACK_RPM_Development_PACKAGE_REQUIRES "mylib-Runtime") -endif(CPACK_GENERATOR MATCHES "RPM") +endif() if(CPACK_GENERATOR MATCHES "DEB") set(CPACK_DEB_COMPONENT_INSTALL "ON") -endif(CPACK_GENERATOR MATCHES "DEB") +endif() if(CPACK_GENERATOR MATCHES "DragNDrop") set(CPACK_COMPONENTS_GROUPING "ONE_PER_GROUP") -endif(CPACK_GENERATOR MATCHES "DragNDrop") +endif() # # Choose grouping way diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index e2d343d9f9..9a022c580c 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -4,21 +4,21 @@ message(STATUS "") if(NOT CPackComponentsForAll_BINARY_DIR) message(FATAL_ERROR "CPackComponentsForAll_BINARY_DIR not set") -endif(NOT CPackComponentsForAll_BINARY_DIR) +endif() if(NOT CPackGen) message(FATAL_ERROR "CPackGen not set") -endif(NOT CPackGen) +endif() get_filename_component(CPACK_LOCATION ${CMAKE_COMMAND} PATH) set(CPackCommand "${CPACK_LOCATION}/cpack") message("cpack = ${CPackCommand}") if(NOT CPackCommand) message(FATAL_ERROR "CPackCommand not set") -endif(NOT CPackCommand) +endif() if(NOT CPackComponentWay) message(FATAL_ERROR "CPackComponentWay not set") -endif(NOT CPackComponentWay) +endif() set(expected_file_mask "") # The usual default behavior is to expect a single file @@ -30,7 +30,7 @@ set(config_type $ENV{CMAKE_CONFIG_TYPE}) set(config_args ) if(config_type) set(config_args -C ${config_type}) -endif(config_type) +endif() set(config_verbose ) if(CPackGen MATCHES "ZIP") @@ -80,15 +80,15 @@ if(CPackGen MATCHES "DragNDrop") elseif (${CPackComponentWay} STREQUAL "AllInOne") set(expected_count 1) endif () -endif(CPackGen MATCHES "DragNDrop") +endif() # clean-up previously CPack generated files if(expected_file_mask) file(GLOB expected_file "${expected_file_mask}") if (expected_file) file(REMOVE ${expected_file}) - endif(expected_file) -endif(expected_file_mask) + endif() +endif() message("config_args = ${config_args}") message("config_verbose = ${config_verbose}") @@ -100,9 +100,9 @@ execute_process(COMMAND ${CPackCommand} ${config_verbose} -G ${CPackGen} ${confi if (CPack_result) message(FATAL_ERROR "error: CPack execution went wrong!, CPack_output=${CPack_output}, CPack_error=${CPack_error}") -else (CPack_result) +else () message(STATUS "CPack_output=${CPack_output}") -endif(CPack_result) +endif() # Now verify if the number of expected file is OK # - using expected_file_mask and @@ -116,11 +116,11 @@ if(expected_file_mask) if(NOT expected_file) message(FATAL_ERROR "error: expected_file=${expected_file} does not exist: CPackComponentsForAll test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error}") - endif(NOT expected_file) + endif() list(LENGTH expected_file actual_count) message(STATUS "actual_count='${actual_count}'") if(NOT actual_count EQUAL expected_count) message(FATAL_ERROR "error: expected_count=${expected_count} does not match actual_count=${actual_count}: CPackComponents test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error})") - endif(NOT actual_count EQUAL expected_count) -endif(expected_file_mask) + endif() +endif() |