This commit adds a top-level compile_test_executables and modifies the
ADD_TEST() macro to let it depend on all executables generated by our
DEAL_II_PICKUP_TESTS() mechanism.
This is mainly intended for user projects and works around the issue
that simultaneous calls to ninja are not reentrant, meaning when
configuring a user project with ninja one is otherwise limited to run
tests in serial.
FUNCTION(DEAL_II_ADD_TEST _category _test_name _comparison_file)
+ IF(NOT TARGET compile_test_executables)
+ ADD_CUSTOM_TARGET(compile_test_executables)
+ ENDIF()
+
IF(NOT DEAL_II_PROJECT_CONFIG_INCLUDED)
MESSAGE(FATAL_ERROR
"\nDEAL_II_ADD_TEST can only be called in external (test sub-) projects after "
${CMAKE_CURRENT_BINARY_DIR}/${_target_short}/interrupt_guard.cc
)
+ ADD_DEPENDENCIES(compile_test_executables ${_target})
+
SET_TARGET_PROPERTIES(${_target} PROPERTIES OUTPUT_NAME ${_target_short})
DEAL_II_SETUP_TARGET(${_target} ${_build})
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams