mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 20:34:39 +01:00
Automatically add test dependencies.
This commit is contained in:
parent
c043eaba0c
commit
0c49e0dd94
@ -20,7 +20,7 @@ add_library(gtest ${GTEST-SOURCES})
|
|||||||
add_custom_target(test
|
add_custom_target(test
|
||||||
echo "Running tests"
|
echo "Running tests"
|
||||||
WORKING_DIRECTORY ${CURRENT_BINARY_DIR}
|
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.
|
# Given a file foo_test.cpp, creates a target foo_test and adds it to the test target.
|
||||||
macro(add_test_file test_source)
|
macro(add_test_file test_source)
|
||||||
@ -31,6 +31,7 @@ macro(add_test_file test_source)
|
|||||||
target_link_libraries(${TEST_NAME} clementine_lib gtest)
|
target_link_libraries(${TEST_NAME} clementine_lib gtest)
|
||||||
add_custom_command(TARGET test POST_BUILD
|
add_custom_command(TARGET test POST_BUILD
|
||||||
COMMAND ./${TEST_NAME})
|
COMMAND ./${TEST_NAME})
|
||||||
|
add_dependencies(test ${TEST_NAME})
|
||||||
endmacro (add_test_file)
|
endmacro (add_test_file)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user