only build unit test if explicitly requested

via make check
This commit is contained in:
derselbst 2018-08-05 21:01:02 +02:00 committed by derselbst
parent 521e5451fc
commit 283eba5a3c

View file

@ -1,6 +1,10 @@
macro ( ADD_FLUID_TEST _test )
ADD_EXECUTABLE(${_test} ${_test}.c $<TARGET_OBJECTS:libfluidsynth-OBJ> )
TARGET_LINK_LIBRARIES(${_test} libfluidsynth)
# only build this unit test when explicitly requested by "make check"
set_target_properties(${_test} PROPERTIES EXCLUDE_FROM_ALL TRUE)
TARGET_LINK_LIBRARIES(${_test} $<TARGET_PROPERTY:libfluidsynth,INTERFACE_LINK_LIBRARIES>)
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
target_include_directories(${_test}