summaryrefslogtreecommitdiffstats
path: root/Tests/Complex
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/CMakeLists.txt88
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt28
-rw-r--r--Tests/Complex/Library/CMakeLists.txt22
-rw-r--r--Tests/Complex/Library/test_preprocess.cmake4
-rw-r--r--Tests/Complex/VarTests.cmake100
5 files changed, 121 insertions, 121 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 45ea901..048f966 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -11,8 +11,8 @@ if(POLICY CMP0003)
cmake_policy(GET CMP0003 P3)
if(NOT "${P3}" STREQUAL "NEW")
message(FATAL_ERROR "cmake_policy(GET) did not report NEW!")
- endif(NOT "${P3}" STREQUAL "NEW")
-endif(POLICY CMP0003)
+ endif()
+endif()
# Test building without per-rule echo lines in Makefiles.
set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
@@ -25,8 +25,8 @@ set(CPACK_SOURCE_IGNORE_FILES "~$;\\.cvsignore$;^C:/hoffman/My Builds/testcase.*
macro(ASSERT value msg)
if (NOT ${value})
message ("Assertion failure:" ${msg} )
- endif (NOT ${value})
-endmacro(ASSERT)
+ endif ()
+endmacro()
# invoke the macro
ASSERT(Complex_BINARY_DIR "The PROJECT command is broken")
@@ -38,8 +38,8 @@ macro(TEST_ARGC value1 value2)
add_definitions(${value1} ${value2})
if (${ARGC} MATCHES 4)
add_definitions(${ARGV2} ${ARGV3})
- endif (${ARGC} MATCHES 4)
-endmacro(TEST_ARGC)
+ endif ()
+endmacro()
# invoke the macro
TEST_ARGC(-DCMAKE_ARGV1 -DCMAKE_ARGV2 -DCMAKE_ARGV3 -DCMAKE_ARGV4)
@@ -47,34 +47,34 @@ TEST_ARGC(-DCMAKE_ARGV1 -DCMAKE_ARGV2 -DCMAKE_ARGV3 -DCMAKE_ARGV4)
macro(TEST_VAR_ARG fa)
if("${ARGV}" MATCHES "^1;2;3$")
message(STATUS "ARGV works")
- else("${ARGV}" MATCHES "^1;2;3$")
+ else()
message(FATAL_ERROR "ARGV does not work; got \"${ARGV}\" instead of \"1;2;3\"")
- endif("${ARGV}" MATCHES "^1;2;3$")
+ endif()
if("${ARGN}" MATCHES "^2;3$")
message(STATUS "ARGN works")
- else("${ARGN}" MATCHES "^2;3$")
+ else()
message(FATAL_ERROR "ARGV does not work; got \"${ARGN}\" instead of \"2;3\"")
- endif("${ARGN}" MATCHES "^2;3$")
-endmacro(TEST_VAR_ARG)
+ endif()
+endmacro()
TEST_VAR_ARG(1 2 3)
# Floating-point comparison test.
if(2.4 LESS 2.4)
message(FATAL_ERROR "Failed: 2.4 LESS 2.4")
-endif(2.4 LESS 2.4)
+endif()
if(2.4 GREATER 2.4)
message(FATAL_ERROR "Failed: 2.4 GREATER 2.4")
-endif(2.4 GREATER 2.4)
+endif()
if(NOT 2.4 EQUAL 2.4)
message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
-endif(NOT 2.4 EQUAL 2.4)
+endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
- endif(NOT CMAKE_COMPILER_IS_GNUCXX)
-endif(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ endif()
+endif()
add_definitions(-DCMAKE_IS_FUN)
@@ -93,7 +93,7 @@ separate_arguments(TEST_SEP)
#
if (EXISTS ${Complex_SOURCE_DIR}/VarTests.cmake)
include(${Complex_SOURCE_DIR}/VarTests.cmake)
-endif (EXISTS ${Complex_SOURCE_DIR}/VarTests.cmake)
+endif ()
include(fileshouldnotbehere OPTIONAL)
load_cache(${Complex_SOURCE_DIR}/Cache
EXCLUDE
@@ -104,9 +104,9 @@ load_cache(${Complex_SOURCE_DIR}/Cache
load_cache(${Complex_SOURCE_DIR}/Cache READ_WITH_PREFIX foo CACHE_TEST_VAR2)
if(${fooCACHE_TEST_VAR2} MATCHES bar)
message("Load cache worked: ${fooCACHE_TEST_VAR2}")
-else(${fooCACHE_TEST_VAR2} MATCHES bar)
+else()
message(FATAL_ERROR "Load cache with prefix failed: ${fooCACHE_TEST_VAR2}")
-endif(${fooCACHE_TEST_VAR2} MATCHES bar)
+endif()
@@ -151,9 +151,9 @@ message("\nIgnore this message")
option(NO_EXEC_PROGRAM "Do not test EXEC_PROGRAM" 0)
if (NOT NO_EXEC_PROGRAM)
exec_program(${CMAKE_COMMAND} ARGS -E echo NO_EXEC_PROGRAM "${Complex_BINARY_DIR}")
-else (NOT NO_EXEC_PROGRAM)
+else ()
message("Set this option ON")
-endif (NOT NO_EXEC_PROGRAM)
+endif ()
mark_as_advanced(NO_EXEC_PROGRAM)
mark_as_advanced(CLEAR NO_EXEC_PROGRAM)
@@ -164,9 +164,9 @@ execute_process(
OUTPUT_VARIABLE TEST_OUT
)
if("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
-else("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
+else()
message(SEND_ERROR "EXECUTE_PROCESS output test failed: [${TEST_OUT}]")
-endif("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
+endif()
# This test has some problems on UNIX systems. Disabling for now.
#
@@ -180,9 +180,9 @@ endif("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
# if("${RESULT}" MATCHES "^0$")
# message(SEND_ERROR
# "EXECUTE_PROCESS result test failed with RESULT=[${RESULT}]")
-# else("${RESULT}" MATCHES "^0$")
+# else()
# message(STATUS "EXECUTE_PROCESS result test passed with RESULT=[${RESULT}]")
-# endif("${RESULT}" MATCHES "^0$")
+# endif()
#
# Create directory.
@@ -206,7 +206,7 @@ foreach (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl
${Complex_SOURCE_DIR}/Library/dummy
${Complex_BINARY_DIR}/Library/libdummylib${ext}
COPYONLY IMMEDIATE)
-endforeach (ext)
+endforeach ()
find_library(FIND_DUMMY_LIB
dummylib
@@ -288,8 +288,8 @@ if (WIN32)
"[${hkey}]" DOC "Registry_Test_Path")
exec_program(${CMAKE_COMMAND} ARGS "-E delete_regv \"${hkey}\"")
exec_program(${CMAKE_COMMAND} ARGS "-E remove \"${dir}/${file}\"")
- endif (NOT UNIX)
-endif (WIN32)
+ endif ()
+endif ()
#
# Test a set and a remove
@@ -305,17 +305,17 @@ foreach(x "a")
if(${x} MATCHES "a")
# Should always execute.
set(IF_INSIDE_FOREACH_THEN_EXECUTED 1)
- else(${x} MATCHES "a")
+ else()
# Should never execute.
set(IF_INSIDE_FOREACH_ELSE_EXECUTED 1)
- endif(${x} MATCHES "a")
-endforeach(x)
+ endif()
+endforeach()
# test WHILE command
set (while_var 1)
while (while_var LESS 1000)
set(while_var ${while_var}0)
-endwhile(while_var LESS 1000)
+endwhile()
set(SHOULD_BE_ZERO )
set(SHOULD_BE_ONE 1)
@@ -328,7 +328,7 @@ if (RESULT EQUAL 1)
set (ELSEIF_RESULT 1)
elseif (RESULT EQUAL 3)
set (ELSEIF_RESULT 1)
- endif (RESULT EQUAL 2)
+ endif ()
elseif (RESULT EQUAL 2)
set (ELSEIF_RESULT 1)
elseif (RESULT EQUAL 3)
@@ -337,25 +337,25 @@ elseif (RESULT EQUAL 3)
elseif (RESULT EQUAL 3)
if (NOT ELSEIF_RESULT EQUAL 1)
set (ELSEIF_RESULT 2)
- endif (NOT ELSEIF_RESULT EQUAL 1)
- endif (RESULT EQUAL 2)
+ endif ()
+ endif ()
elseif (RESULT EQUAL 4)
if (RESULT EQUAL 2)
set (ELSEIF_RESULT 1)
elseif (RESULT EQUAL 3)
set (ELSEIF_RESULT 1)
- endif (RESULT EQUAL 2)
-else (RESULT EQUAL 1)
+ endif ()
+else ()
if (RESULT EQUAL 2)
set (ELSEIF_RESULT 1)
elseif (RESULT EQUAL 3)
set (ELSEIF_RESULT 1)
- endif (RESULT EQUAL 2)
-endif (RESULT EQUAL 1)
+ endif ()
+endif ()
if (NOT ELSEIF_RESULT EQUAL 2)
set (ELSEIF_RESULT 0)
-endif (NOT ELSEIF_RESULT EQUAL 2)
+endif ()
# test handling of parenthetical groups in conditionals
if (2 GREATER 1 AND (4 LESS 3 OR 5 LESS 6) AND NOT (7 GREATER 8))
@@ -381,19 +381,19 @@ configure_file(
string(REGEX MATCH "b" RESULT "abc")
if(NOT RESULT)
message(SEND_ERROR "string(REGEX MATCH ... ) test failed.")
-endif(NOT RESULT)
+endif()
string(REGEX MATCHALL "b" RESULT "abcb")
if(NOT RESULT)
message(SEND_ERROR "string(REGEX MATCHALL ... ) test failed.")
-endif(NOT RESULT)
+endif()
string(REGEX REPLACE ".([bd])." "[\\1]" RESULT "a(b)c(d)e")
if("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$")
set(STRING_REGEX_PASSED 1)
-endif("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$")
+endif()
if(NOT STRING_REGEX_PASSED)
message(SEND_ERROR
"string(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")")
-endif(NOT STRING_REGEX_PASSED)
+endif()
#
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index 4138835..432dbf8 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -11,16 +11,16 @@ add_library(ExeImportedTarget UNKNOWN IMPORTED)
# Test if(TARGET) command.
if(NOT TARGET CMakeTestLibrary)
message(FATAL_ERROR "if(NOT TARGET CMakeTestLibrary) returned true!")
-endif(NOT TARGET CMakeTestLibrary)
+endif()
if(NOT TARGET ExeImportedTarget)
message(FATAL_ERROR "if(NOT TARGET ExeImportedTarget) returned true!")
-endif(NOT TARGET ExeImportedTarget)
+endif()
if(TARGET LibImportedTarget)
message(FATAL_ERROR "if(TARGET LibImportedTarget) returned true!")
-endif(TARGET LibImportedTarget)
+endif()
if(TARGET NotATarget)
message(FATAL_ERROR "if(TARGET NotATarget) returned true!")
-endif(TARGET NotATarget)
+endif()
# Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to
set(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
@@ -46,37 +46,37 @@ add_executable(complex.file complex.file.cxx complex_nobuild.cxx
if (UNIX)
target_link_libraries(complex ${CMAKE_DL_LIBS})
-else(UNIX)
+else()
if (NOT BORLAND)
if(NOT MINGW)
target_link_libraries(complex rpcrt4.lib)
- endif(NOT MINGW)
- endif(NOT BORLAND)
-endif (UNIX)
+ endif()
+ endif()
+endif ()
# Test linking to static lib when a shared lib has the same name.
if(CMAKE_EXE_LINK_STATIC_CXX_FLAGS)
add_definitions(-DCOMPLEX_TEST_LINK_STATIC)
target_link_libraries(complex CMakeTestLinkStatic)
-endif(CMAKE_EXE_LINK_STATIC_CXX_FLAGS)
+endif()
# can we get the path to a source file
get_source_file_property(A_LOCATION A.cxx LOCATION)
if ("${A_LOCATION}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/A.cxx")
add_definitions(-DCMAKE_FOUND_ACXX)
-endif ("${A_LOCATION}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/A.cxx")
+endif ()
# get the directory parent
get_directory_property(P_VALUE PARENT_DIRECTORY)
if ("${P_VALUE}" STREQUAL "${CMAKE_SOURCE_DIR}")
add_definitions(-DCMAKE_FOUND_PARENT)
-endif ("${P_VALUE}" STREQUAL "${CMAKE_SOURCE_DIR}")
+endif ()
# get the stack of listfiles
include(Included.cmake)
if ("${LF_VALUE}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt;${CMAKE_CURRENT_SOURCE_DIR}/Included.cmake")
add_definitions(-DCMAKE_FOUND_LISTFILE_STACK)
-endif ("${LF_VALUE}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt;${CMAKE_CURRENT_SOURCE_DIR}/Included.cmake")
+endif ()
# Test add/remove definitions.
add_definitions(
@@ -128,7 +128,7 @@ target_link_libraries(notInAllExe notInAllLib)
if(MSVC)
set_target_properties(notInAllExe PROPERTIES
LINK_FLAGS "/NODEFAULTLIB:LIBC;LIBCMT;MSVCRT")
-endif(MSVC)
+endif()
# Test creating a custom target that builds not-in-all targets.
add_custom_target(notInAllCustom)
@@ -146,7 +146,7 @@ add_subdirectory(Temp)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
add_executable(testSystemDir testSystemDir.cxx)
set_target_properties(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror")
-endif(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
+endif()
#
# Extra coverage.Not used.
diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt
index 41faeba..5c43052 100644
--- a/Tests/Complex/Library/CMakeLists.txt
+++ b/Tests/Complex/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/Complex/Library/test_preprocess.cmake b/Tests/Complex/Library/test_preprocess.cmake
index 885c613..4c8ec21 100644
--- a/Tests/Complex/Library/test_preprocess.cmake
+++ b/Tests/Complex/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()
diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake
index 7e968fd..52ec1fc 100644
--- a/Tests/Complex/VarTests.cmake
+++ b/Tests/Complex/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