Skip to content
Snippets Groups Projects
Commit a307aaae authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CMake] Improve version check.

The old code only worked because the major version changed.
parent 68853233
No related branches found
No related tags found
1 merge request!31Feature/colebrookwhiteboundarylayer
...@@ -43,15 +43,7 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour ...@@ -43,15 +43,7 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour
endif() endif()
# add test # add test
if(DUNE_COMMON_VERSION_MAJOR VERSION_GREATER 2.4) if(DUNE_COMMON_VERSION VERSION_LESS 3.0)
dune_add_test(NAME ${dumux_test}
TARGET ${dumux_test_executable}
COMMAND ${dumux_test_args}
SKIP_ON_77)
# tests always require the executable to run
set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test})
else()
# add test # add test
add_test(${dumux_test} ${dumux_test_args}) add_test(${dumux_test} ${dumux_test_args})
...@@ -59,5 +51,12 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour ...@@ -59,5 +51,12 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour
set_tests_properties(${dumux_test} PROPERTIES SKIP_RETURN_CODE 77) set_tests_properties(${dumux_test} PROPERTIES SKIP_RETURN_CODE 77)
# tests always require the executable to run # tests always require the executable to run
set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test_executable}) set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test_executable})
else()
dune_add_test(NAME ${dumux_test}
TARGET ${dumux_test_executable}
COMMAND ${dumux_test_args}
SKIP_ON_77)
# tests always require the executable to run
set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test})
endif() endif()
endmacro() endmacro()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment