Skip to content
Snippets Groups Projects
Commit ebca3539 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[cmake][Release] Allow downstream modules to disable the testing magic

Some downstream modules like pdelab and dumux already abandoned the
current bahaviour of building tests on make test. The testing infrastructure
does throw them error messages during make test though. This commi introduces
the switch DUNE_DISABLE_TEST_MAGIC which may be set by downstream modules
to disable the magic. To see how to switch a downstream module, see:

http://conan2.iwr.uni-heidelberg.de/git/pdelab/dune-pdelab/commit/dc5ef4b39f5be5690457f0bbfe008b1f45d5fd98
parent a1bd9774
No related branches found
No related tags found
No related merge requests found
......@@ -882,7 +882,9 @@ endif()
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
endif("${ARGC}" EQUAL "1")
test_dep()
if(NOT DUNE_DISABLE_TEST_MAGIC)
test_dep()
endif()
include(CPack)
......
......@@ -47,8 +47,10 @@ endmacro(get_directory_test_target _target _dir)
# E.g. for dune/istl/test the target will be dune_istl_test.
#
macro(add_directory_test_target _target)
get_directory_test_target(${_target} "${CMAKE_CURRENT_BINARY_DIR}")
add_custom_target(${${_target}})
dune_common_script_dir(SCRIPT_DIR)
configure_file(${SCRIPT_DIR}/BuildTests.cmake.in BuildTests.cmake @ONLY)
if(NOT DUNE_DISABLE_TEST_MAGIC)
get_directory_test_target(${_target} "${CMAKE_CURRENT_BINARY_DIR}")
add_custom_target(${${_target}})
dune_common_script_dir(SCRIPT_DIR)
configure_file(${SCRIPT_DIR}/BuildTests.cmake.in BuildTests.cmake @ONLY)
endif()
endmacro(add_directory_test_target)
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