mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-18 18:11:05 +00:00
simplify dependency handling of unit tests
This commit is contained in:
parent
7987446fdf
commit
c433fc887c
2 changed files with 9 additions and 23 deletions
|
@ -11,5 +11,10 @@ macro ( ADD_FLUID_TEST _test )
|
|||
$<TARGET_PROPERTY:libfluidsynth,INCLUDE_DIRECTORIES> # include all other header search paths needed by libfluidsynth (esp. glib)
|
||||
)
|
||||
|
||||
# add the test to ctest
|
||||
ADD_TEST(NAME ${_test} COMMAND ${_test})
|
||||
|
||||
# append the current unit test to check-target as dependency
|
||||
add_dependencies(check ${_test})
|
||||
|
||||
endmacro ( ADD_FLUID_TEST )
|
||||
|
|
|
@ -4,6 +4,10 @@ project(fluidsynth-test)
|
|||
ENABLE_TESTING()
|
||||
include ( FluidUnitTest )
|
||||
|
||||
# first define the test target, used by the macros below
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> --output-on-failure)
|
||||
|
||||
|
||||
## add unit tests here ##
|
||||
ADD_FLUID_TEST(test_sample_cache)
|
||||
ADD_FLUID_TEST(test_sfont_loading)
|
||||
|
@ -14,26 +18,3 @@ if ( LIBSNDFILE_HASVORBIS )
|
|||
ADD_FLUID_TEST(test_sf3_sfont_loading)
|
||||
ADD_FLUID_TEST(test_sf3_defsfont_preset_iteration)
|
||||
endif ( LIBSNDFILE_HASVORBIS )
|
||||
|
||||
|
||||
if ( LIBSNDFILE_HASVORBIS )
|
||||
add_custom_target(check
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> --output-on-failure
|
||||
DEPENDS
|
||||
test_sample_cache
|
||||
test_sfont_loading
|
||||
test_defsfont_preset_iteration
|
||||
test_sample_rate_change
|
||||
test_sf3_sfont_loading
|
||||
test_sf3_defsfont_preset_iteration
|
||||
)
|
||||
else ( LIBSNDFILE_HASVORBIS )
|
||||
add_custom_target(check
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> --output-on-failure
|
||||
DEPENDS
|
||||
test_sample_cache
|
||||
test_sfont_loading
|
||||
test_defsfont_preset_iteration
|
||||
test_sample_rate_change
|
||||
)
|
||||
endif ( LIBSNDFILE_HASVORBIS )
|
||||
|
|
Loading…
Reference in a new issue