Commit 867a3557 authored by Christoph Grüninger's avatar Christoph Grüninger Committed by Timo Koch
Browse files

[cmake][cleanup] Remove version check for Dune 2.5

Dune 2.5 is required anway.
parent 2fa10415
......@@ -32,11 +32,5 @@ add_subdirectory(dumux)
add_subdirectory(test EXCLUDE_FROM_ALL)
add_subdirectory(tutorial EXCLUDE_FROM_ALL)
if(DUNE_COMMON_VERSION VERSION_LESS 2.5)
# de-activate testing the DUNE way
# now ctest (aka make test) does not build the tests
set(DUNE_TEST_MAGIC OFF)
endif()
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
......@@ -46,22 +46,12 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour
endif()
# add test
if(DUNE_COMMON_VERSION VERSION_LESS 2.5)
# add test
add_test(${dumux_test} ${dumux_test_args})
# return code 77 should be interpreted as skipped test
set_tests_properties(${dumux_test} PROPERTIES SKIP_RETURN_CODE 77)
# tests always require the executable to run
set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test_executable})
else()
list(GET dumux_test_args 0 dumux_test_command)
list(REMOVE_AT dumux_test_args 0)
dune_add_test(NAME ${dumux_test}
TARGET ${dumux_test_executable}
COMMAND ${dumux_test_command}
CMD_ARGS ${dumux_test_args})
# tests always require the executable to run
set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test_executable})
endif()
list(GET dumux_test_args 0 dumux_test_command)
list(REMOVE_AT dumux_test_args 0)
dune_add_test(NAME ${dumux_test}
TARGET ${dumux_test_executable}
COMMAND ${dumux_test_command}
CMD_ARGS ${dumux_test_args})
# tests always require the executable to run
set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test_executable})
endmacro()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment