From 5096161de9dc94c6e20107c6cc9e45f9f48e5c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Fri, 20 May 2016 20:00:03 +0200 Subject: [PATCH] Added custom target for executing the tests. --- tests/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fb344dc..d78fd5f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -21,3 +21,8 @@ file(COPY data DESTINATION ${CMAKE_BINARY_DIR}) add_executable(${target} ${core_sources}) target_link_libraries(${target} ${libraries}) GTEST_ADD_TESTS(tests "" ${core_sources}) + +add_custom_target(run-tests + COMMAND ${CMAKE_BINARY_DIR}/bin/tests + DEPENDS ${target} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR})