diff options
Diffstat (limited to 'Tests/BuildDepends/CMakeLists.txt')
-rw-r--r-- | Tests/BuildDepends/CMakeLists.txt | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 045acb8..d3b1f3c 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -15,7 +15,7 @@ set(CMAKE_SUPPRESS_REGENERATION 1) # Xcode needs some help with the fancy dependencies in this test. if("${CMAKE_GENERATOR}" MATCHES "Xcode") set(HELP_XCODE 1) -endif("${CMAKE_GENERATOR}" MATCHES "Xcode") +endif() function(help_xcode_depends) if(HELP_XCODE) file(GLOB_RECURSE MACRO_OBJS @@ -24,9 +24,9 @@ function(help_xcode_depends) if(MACRO_OBJS) message("Helping Xcode by removing objects [${MACRO_OBJS}]") file(REMOVE ${MACRO_OBJS}) - endif(MACRO_OBJS) - endif(HELP_XCODE) -endfunction(help_xcode_depends) + endif() + endif() +endfunction() if("${CMAKE_GENERATOR}" MATCHES "Ninja") set(HELP_NINJA 1) # TODO Why is this needed? @@ -80,12 +80,12 @@ if(HELP_XCODE) ${BuildDepends_SOURCE_DIR}/Project testRebuild OUTPUT_VARIABLE OUTPUT) -endif(HELP_XCODE) +endif() message("Output from first build:\n${OUTPUT}") if(NOT RESULT) message(SEND_ERROR "Could not build test project (1)!") -endif(NOT RESULT) +endif() set(bar ${BuildDepends_BINARY_DIR}/Project/bar${CMAKE_EXECUTABLE_SUFFIX}) if(EXISTS @@ -111,9 +111,9 @@ message("Run result: ${runResult} Output: \"${out}\"") if("${out}" STREQUAL "foo ") message("Worked!") -else("${out}" STREQUAL "foo ") +else() message(SEND_ERROR "Project did not initially build properly: ${out}") -endif("${out}" STREQUAL "foo ") +endif() message("Running ${zot} ") execute_process(COMMAND ${zot} OUTPUT_VARIABLE out RESULT_VARIABLE runResult) @@ -123,9 +123,9 @@ message("Run result: ${runResult} Output: \"${out}\"") set(VALUE_UNCHANGED "[zot] [zot_custom] [zot_macro_dir] [zot_macro_tgt] ") if("${out}" STREQUAL "${VALUE_UNCHANGED}") message("Worked!") -else("${out}" STREQUAL "${VALUE_UNCHANGED}") +else() message(SEND_ERROR "Project did not initially build properly: ${out}") -endif("${out}" STREQUAL "${VALUE_UNCHANGED}") +endif() message("Waiting 3 seconds...") # any additional argument will cause ${bar} to wait forever @@ -174,7 +174,7 @@ endif() message("Output from second build:\n${OUTPUT}") if(NOT RESULT) message(SEND_ERROR "Could not build test project (2)!") -endif(NOT RESULT) +endif() if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") @@ -193,9 +193,9 @@ message("Run result: ${runResult} Output: \"${out}\"") if("${out}" STREQUAL "foo changed ") message("Worked!") -else("${out}" STREQUAL "foo changed ") +else() message(SEND_ERROR "Project did not rebuild properly!") -endif("${out}" STREQUAL "foo changed ") +endif() message("Running ${zot} ") execute_process(COMMAND ${zot} OUTPUT_VARIABLE out RESULT_VARIABLE runResult) @@ -207,9 +207,9 @@ set(VALUE_CHANGED ) if("${out}" STREQUAL "${VALUE_CHANGED}") message("Worked!") -else("${out}" STREQUAL "${VALUE_CHANGED}") +else() message(SEND_ERROR "Project did not rebuild properly!") -endif("${out}" STREQUAL "${VALUE_CHANGED}") +endif() if(TEST_LINK_DEPENDS) set(linkdep ${BuildDepends_BINARY_DIR}/Project/linkdep${CMAKE_EXECUTABLE_SUFFIX}) |