summaryrefslogtreecommitdiff
path: root/Tests/ComplexOneConfig/VarTests.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 /Tests/ComplexOneConfig/VarTests.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 'Tests/ComplexOneConfig/VarTests.cmake')
-rw-r--r--Tests/ComplexOneConfig/VarTests.cmake100
1 files changed, 50 insertions, 50 deletions
diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake
index 7e968fd626..52ec1fc8e1 100644
--- a/Tests/ComplexOneConfig/VarTests.cmake
+++ b/Tests/ComplexOneConfig/VarTests.cmake
@@ -6,9 +6,9 @@ set (ZERO_VAR2 0)
if(ZERO_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED)
-else(ZERO_VAR)
+else()
add_definitions(-DSHOULD_BE_DEFINED)
-endif(ZERO_VAR)
+endif()
set(ONE_VAR 1)
set(ONE_VAR2 1)
@@ -25,83 +25,83 @@ variable_requires(ONE_VAR
#
if(NOT ZERO_VAR)
add_definitions(-DSHOULD_BE_DEFINED_NOT)
-else(NOT ZERO_VAR)
+else()
add_definitions(-DSHOULD_NOT_BE_DEFINED_NOT)
-endif(NOT ZERO_VAR)
+endif()
if(NOT ONE_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_NOT2)
-else(NOT ONE_VAR)
+else()
add_definitions(-DSHOULD_BE_DEFINED_NOT2)
-endif(NOT ONE_VAR)
+endif()
if(ONE_VAR AND ONE_VAR2)
add_definitions(-DSHOULD_BE_DEFINED_AND)
-else(ONE_VAR AND ONE_VAR2)
+else()
add_definitions(-DSHOULD_NOT_BE_DEFINED_AND)
-endif(ONE_VAR AND ONE_VAR2)
+endif()
if(ONE_VAR AND ZERO_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_AND2)
-else(ONE_VAR AND ZERO_VAR)
+else()
add_definitions(-DSHOULD_BE_DEFINED_AND2)
-endif(ONE_VAR AND ZERO_VAR)
+endif()
if(ZERO_VAR OR ONE_VAR2)
add_definitions(-DSHOULD_BE_DEFINED_OR)
-else(ZERO_VAR OR ONE_VAR2)
+else()
add_definitions(-DSHOULD_NOT_BE_DEFINED_OR)
-endif(ZERO_VAR OR ONE_VAR2)
+endif()
if(ZERO_VAR OR ZERO_VAR2)
add_definitions(-DSHOULD_NOT_BE_DEFINED_OR2)
-else(ZERO_VAR OR ZERO_VAR2)
+else()
add_definitions(-DSHOULD_BE_DEFINED_OR2)
-endif(ZERO_VAR OR ZERO_VAR2)
+endif()
if(STRING_VAR MATCHES "^CMake")
add_definitions(-DSHOULD_BE_DEFINED_MATCHES)
-else(STRING_VAR MATCHES "^CMake")
+else()
add_definitions(-DSHOULD_NOT_BE_DEFINED_MATCHES)
-endif(STRING_VAR MATCHES "^CMake")
+endif()
if(STRING_VAR MATCHES "^foo")
add_definitions(-DSHOULD_NOT_BE_DEFINED_MATCHES2)
-else(STRING_VAR MATCHES "^foo")
+else()
add_definitions(-DSHOULD_BE_DEFINED_MATCHES2)
-endif(STRING_VAR MATCHES "^foo")
+endif()
if(COMMAND "IF")
add_definitions(-DSHOULD_BE_DEFINED_COMMAND)
-else(COMMAND "IF")
+else()
add_definitions(-DSHOULD_NOT_BE_DEFINED_COMMAND)
-endif(COMMAND "IF")
+endif()
if(COMMAND "ROQUEFORT")
add_definitions(-DSHOULD_NOT_BE_DEFINED_COMMAND2)
-else(COMMAND "ROQUEFORT")
+else()
add_definitions(-DSHOULD_BE_DEFINED_COMMAND2)
-endif(COMMAND "ROQUEFORT")
+endif()
if (EXISTS ${Complex_SOURCE_DIR}/VarTests.cmake)
add_definitions(-DSHOULD_BE_DEFINED_EXISTS)
-else(EXISTS ${Complex_SOURCE_DIR}/VarTests.cmake)
+else()
add_definitions(-DSHOULD_NOT_BE_DEFINED_EXISTS)
-endif (EXISTS ${Complex_SOURCE_DIR}/VarTests.cmake)
+endif ()
if (EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
add_definitions(-DSHOULD_NOT_BE_DEFINED_EXISTS2)
-else(EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
+else()
add_definitions(-DSHOULD_BE_DEFINED_EXISTS2)
-endif (EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
+endif ()
if (IS_DIRECTORY ${Complex_SOURCE_DIR})
add_definitions(-DSHOULD_BE_DEFINED_IS_DIRECTORY)
-endif (IS_DIRECTORY ${Complex_SOURCE_DIR})
+endif ()
if (NOT IS_DIRECTORY ${Complex_SOURCE_DIR}/VarTests.cmake)
add_definitions(-DSHOULD_BE_DEFINED_IS_DIRECTORY2)
-endif (NOT IS_DIRECTORY ${Complex_SOURCE_DIR}/VarTests.cmake)
+endif ()
set (SNUM1_VAR "1")
set (SNUM2_VAR "2")
@@ -110,78 +110,78 @@ set (SNUM3_VAR "1")
if (SNUM1_VAR LESS SNUM2_VAR)
add_definitions(-DSHOULD_BE_DEFINED_LESS)
-else (SNUM1_VAR LESS SNUM2_VAR)
+else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_LESS)
-endif (SNUM1_VAR LESS SNUM2_VAR)
+endif ()
if (SNUM2_VAR LESS SNUM1_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_LESS2)
-else (SNUM2_VAR LESS SNUM1_VAR)
+else ()
add_definitions(-DSHOULD_BE_DEFINED_LESS2)
-endif (SNUM2_VAR LESS SNUM1_VAR)
+endif ()
if (SNUM2_VAR GREATER SNUM1_VAR)
add_definitions(-DSHOULD_BE_DEFINED_GREATER)
-else (SNUM2_VAR GREATER SNUM1_VAR)
+else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER)
-endif (SNUM2_VAR GREATER SNUM1_VAR)
+endif ()
if (SNUM2_VAR EQUAL SNUM1_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_EQUAL)
-else (SNUM2_VAR EQUAL SNUM1_VAR)
+else ()
add_definitions(-DSHOULD_BE_DEFINED_EQUAL)
-endif (SNUM2_VAR EQUAL SNUM1_VAR)
+endif ()
if (SNUM3_VAR EQUAL SNUM1_VAR)
add_definitions(-DSHOULD_BE_DEFINED_EQUAL)
-else (SNUM3_VAR EQUAL SNUM1_VAR)
+else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_EQUAL)
-endif (SNUM3_VAR EQUAL SNUM1_VAR)
+endif ()
if (SNUM1_VAR GREATER SNUM2_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER2)
-else (SNUM1_VAR GREATER SNUM2_VAR)
+else ()
add_definitions(-DSHOULD_BE_DEFINED_GREATER2)
-endif (SNUM1_VAR GREATER SNUM2_VAR)
+endif ()
set (SSTR1_VAR "abc")
set (SSTR2_VAR "bcd")
if (SSTR1_VAR STRLESS SSTR2_VAR)
add_definitions(-DSHOULD_BE_DEFINED_STRLESS)
-else (SSTR1_VAR STRLESS SSTR2_VAR)
+else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS)
-endif (SSTR1_VAR STRLESS SSTR2_VAR)
+endif ()
if (SSTR2_VAR STRLESS SSTR1_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS2)
-else (SSTR2_VAR STRLESS SSTR1_VAR)
+else ()
add_definitions(-DSHOULD_BE_DEFINED_STRLESS2)
-endif (SSTR2_VAR STRLESS SSTR1_VAR)
+endif ()
if (SSTR2_VAR STRGREATER SSTR1_VAR)
add_definitions(-DSHOULD_BE_DEFINED_STRGREATER)
-else (SSTR2_VAR STRGREATER SSTR1_VAR)
+else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER)
-endif (SSTR2_VAR STRGREATER SSTR1_VAR)
+endif ()
if (SSTR1_VAR STRGREATER SSTR2_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER2)
-else (SSTR1_VAR STRGREATER SSTR2_VAR)
+else ()
add_definitions(-DSHOULD_BE_DEFINED_STRGREATER2)
-endif (SSTR1_VAR STRGREATER SSTR2_VAR)
+endif ()
#
# Test FOREACH
#
foreach (INDEX 1 2)
set(FOREACH_VAR${INDEX} "VALUE${INDEX}")
-endforeach(INDEX)
+endforeach()
set(FOREACH_CONCAT "")
foreach (INDEX a;b;c;d;e;f;g)
set(FOREACH_CONCAT "${FOREACH_CONCAT}${INDEX}")
-endforeach(INDEX)
+endforeach()
#
# Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations