Commit 3a1ef36e authored by Matthias Vallentin's avatar Matthias Vallentin

Support for 'make test'.

This commit harnesses CMake's unit test infrastructure which redirects the
output of the unit test executable to `/dev/null`. If this is not desired, one
could instead manually add a 'test' Makefile target as follows:

    add_custom_target(test ${EXECUTABLE_OUTPUT_PATH}/unit_tests)
    add_dependencies(test unit_tests)
parent abe51d20
......@@ -181,6 +181,7 @@ else ()
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin CACHE PATH "Single directory for all executables")
endif ()
enable_testing()
add_subdirectory(unit_testing)
add_subdirectory(examples)
add_subdirectory(benchmarks)
......
......@@ -37,3 +37,5 @@ include_directories(. ${cppa_INCLUDE} ${Boost_INCLUDE_DIRS})
set(EXAMPLE_LIBS ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${Boost_THREAD_LIBRARY})
target_link_libraries(unit_tests ${EXAMPLE_LIBS})
add_test(unit_tests ${EXECUTABLE_OUTPUT_PATH}/unit_tests)
Markdown is supported
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