1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 12:28:31 +01:00

Automatically add test dependencies.

This commit is contained in:
John Maguire 2010-03-01 15:43:27 +00:00
parent c043eaba0c
commit 0c49e0dd94

View File

@ -20,7 +20,7 @@ add_library(gtest ${GTEST-SOURCES})
add_custom_target(test
echo "Running tests"
WORKING_DIRECTORY ${CURRENT_BINARY_DIR}
DEPENDS song_test m3uparser_test)
)
# Given a file foo_test.cpp, creates a target foo_test and adds it to the test target.
macro(add_test_file test_source)
@ -31,6 +31,7 @@ macro(add_test_file test_source)
target_link_libraries(${TEST_NAME} clementine_lib gtest)
add_custom_command(TARGET test POST_BUILD
COMMAND ./${TEST_NAME})
add_dependencies(test ${TEST_NAME})
endmacro (add_test_file)