Change unit tests to run as post-build step.

This is how it used to be in most of the old project files. The
CMake conversion required the tests to be run manually after the
build, either by running the binary directly or by calling CTest.
This commit removes the 'dependency' on CTest and restores the
old build process.
This commit is contained in:
Patrick Johnmeyer 2015-04-04 01:31:04 -05:00
parent bd11339b2d
commit 2ee151af76

View file

@ -40,14 +40,10 @@ endif()
target_link_libraries(TestUnitTest++ UnitTest++)
# turn on testing
enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -V)
# add the test runner as a test
add_test(NAME TestUnitTest++ COMMAND TestUnitTest++ ${CONFIG_PATH} ${CONFIG_TASKS_PATH} ${SOUND_LOG_PATH})
add_dependencies(check TestUnitTest++)
# run unit tests as post build step
add_custom_command(TARGET TestUnitTest++
POST_BUILD COMMAND TestUnitTest++
COMMENT "Running unit tests")
# add install targets
# need a custom install path?