summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig/Library
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Tests/ComplexOneConfig/Library
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-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 'Tests/ComplexOneConfig/Library')
-rw-r--r--Tests/ComplexOneConfig/Library/CMakeLists.txt22
-rw-r--r--Tests/ComplexOneConfig/Library/test_preprocess.cmake4
2 files changed, 13 insertions, 13 deletions
diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt
index 41faeba..5c43052 100644
--- a/Tests/ComplexOneConfig/Library/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt
@@ -33,10 +33,10 @@ if(WIN32)
target_link_libraries(CMakeTestLibrary
optimized
kernel32.lib)
- endif(NOT MINGW)
- endif(NOT BORLAND)
- endif(NOT CYGWIN)
-endif(WIN32)
+ endif()
+ endif()
+ endif()
+endif()
#
# Create shared library
@@ -53,12 +53,12 @@ define_property(
set_target_properties(CMakeTestCLibraryShared PROPERTIES FOO BAR)
if(NOT BEOS AND NOT WIN32) # No libm on BeOS.
set_target_properties(CMakeTestCLibraryShared PROPERTIES LINK_FLAGS "-lm")
-endif(NOT BEOS AND NOT WIN32)
+endif()
get_target_property(FOO_BAR_VAR CMakeTestCLibraryShared FOO)
if(${FOO_BAR_VAR} MATCHES "BAR")
-else(${FOO_BAR_VAR} MATCHES "BAR")
+else()
message(SEND_ERROR "SET_TARGET_PROPERTIES or GET_TARGET_PROPERTY failed, FOO_BAR_VAR should be BAR, but is ${FOO_BAR_VAR}")
-endif(${FOO_BAR_VAR} MATCHES "BAR")
+endif()
# Create static and shared lib of same name.
if(CMAKE_EXE_LINK_STATIC_CXX_FLAGS)
@@ -66,7 +66,7 @@ if(CMAKE_EXE_LINK_STATIC_CXX_FLAGS)
add_library(CMakeTestLinkShared SHARED TestLink.c)
set_target_properties(CMakeTestLinkStatic CMakeTestLinkShared
PROPERTIES OUTPUT_NAME CMakeTestLink)
-endif(CMAKE_EXE_LINK_STATIC_CXX_FLAGS)
+endif()
#
# Attach pre-build/pre-link/post-build custom-commands to the lib.
@@ -127,7 +127,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile" AND CMAKE_MAKE_PROGRAM)
if(ARCH_COUNT GREATER 1)
# OSX does not support preprocessing more than one architecture.
set(MAYBE_ALL)
- endif(ARCH_COUNT GREATER 1)
+ endif()
# Custom target to try preprocessing invocation.
add_custom_target(test_preprocess ${MAYBE_ALL}
@@ -136,5 +136,5 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile" AND CMAKE_MAKE_PROGRAM)
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/test_preprocess.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
- endif(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE)
-endif("${CMAKE_GENERATOR}" MATCHES "Makefile" AND CMAKE_MAKE_PROGRAM)
+ endif()
+endif()
diff --git a/Tests/ComplexOneConfig/Library/test_preprocess.cmake b/Tests/ComplexOneConfig/Library/test_preprocess.cmake
index 885c613..4c8ec21 100644
--- a/Tests/ComplexOneConfig/Library/test_preprocess.cmake
+++ b/Tests/ComplexOneConfig/Library/test_preprocess.cmake
@@ -2,6 +2,6 @@ set(TEST_FILE CMakeFiles/create_file.dir/create_file.i)
file(READ ${TEST_FILE} CONTENTS)
if("${CONTENTS}" MATCHES "Unable to close")
message(STATUS "${TEST_FILE} created successfully!")
-else("${CONTENTS}" MATCHES "Unable to close")
+else()
message(FATAL_ERROR "${TEST_FILE} creation failed!")
-endif("${CONTENTS}" MATCHES "Unable to close")
+endif()