diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ab7c6888..bc5d1696e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -354,10 +354,14 @@ set(STORM_GENERATED_SOURCES "${PROJECT_BINARY_DIR}/src/storm/utility/storm-versi include_directories("${PROJECT_BINARY_DIR}/include") include(CTest) +# Compiles all tests +add_custom_target(tests) +# Compiles and runs all tests add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) set(CMAKE_CTEST_COMMAND_VERBOSE ${CMAKE_CTEST_COMMAND} -V) add_custom_target(check-verbose COMMAND ${CMAKE_CTEST_COMMAND_VERBOSE}) - +add_dependencies(check tests) +add_dependencies(check-verbose tests) set(STORM_TARGETS "") add_subdirectory(src) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index d45a4b4dd..d07ac2361 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -17,9 +17,8 @@ foreach (testsuite adapter builder logic modelchecker parser permissivescheduler target_link_libraries(test-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) add_dependencies(test-${testsuite} test-resources) - add_test(run-test-${testsuite} test-${testsuite}) - add_dependencies(check test-${testsuite}) - add_dependencies(check-verbose test-${testsuite}) + add_test(NAME run-test-${testsuite} COMMAND $) + add_dependencies(tests test-${testsuite}) endforeach ()