Added custom target for executing the tests.

This commit is contained in:
Patrick Lühne 2016-05-20 20:00:03 +02:00
parent ffda7b5e27
commit 5096161de9

View File

@ -21,3 +21,8 @@ file(COPY data DESTINATION ${CMAKE_BINARY_DIR})
add_executable(${target} ${core_sources}) add_executable(${target} ${core_sources})
target_link_libraries(${target} ${libraries}) target_link_libraries(${target} ${libraries})
GTEST_ADD_TESTS(tests "" ${core_sources}) GTEST_ADD_TESTS(tests "" ${core_sources})
add_custom_target(run-tests
COMMAND ${CMAKE_BINARY_DIR}/bin/tests
DEPENDS ${target}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})