Debian Codegraph @

tests/CMakeLists.txt

raw
1 add_custom_target(check
2 COMMAND ${CMAKE_CTEST_COMMAND} --verbose --build-config "$<CONFIG>"
3 )
4
5 add_executable(tests
6 tests.cpp
7 SoundTest.cpp
8 SynthesizerTest.cpp
9 TestUtils.cpp
10 )
11
12 configure_file(TestConfig.h.in TestConfig.h @ONLY)
13
14 target_link_libraries(tests
15 ${APPLIB_NAME}
16 Qt5::Test
17 Catch2::Catch2
18 )
19
20 target_include_directories(tests
21 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
22
23 add_test(NAME tests COMMAND tests)
24
25 # Before running tests, make sure tests they are built if necessary
26 add_dependencies(check tests)