2019-11-23 19:10:37 +01:00
|
|
|
###############################
|
|
|
|
|
# Test application
|
|
|
|
|
|
|
|
|
|
project(sfizz)
|
|
|
|
|
|
|
|
|
|
set(SFIZZ_TEST_SOURCES
|
|
|
|
|
RegionT.cpp
|
2020-08-10 17:22:49 +02:00
|
|
|
TestHelpers.h
|
|
|
|
|
TestHelpers.cpp
|
2019-12-18 10:24:01 +01:00
|
|
|
ParsingT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
HelpersT.cpp
|
|
|
|
|
HelpersT.cpp
|
|
|
|
|
AudioBufferT.cpp
|
2019-12-28 23:01:45 +01:00
|
|
|
EGDescriptionT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
RangeT.cpp
|
|
|
|
|
OpcodeT.cpp
|
|
|
|
|
BufferT.cpp
|
|
|
|
|
SIMDHelpersT.cpp
|
|
|
|
|
FilesT.cpp
|
2019-12-15 02:05:53 +01:00
|
|
|
MidiStateT.cpp
|
2020-05-28 23:33:48 +02:00
|
|
|
InterpolatorsT.cpp
|
2020-03-31 20:13:13 +02:00
|
|
|
SmoothersT.cpp
|
2020-06-15 02:03:04 +02:00
|
|
|
PolyphonyT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
RegionActivationT.cpp
|
2019-11-30 14:50:57 +01:00
|
|
|
RegionValueComputationsT.cpp
|
2020-04-01 00:18:03 +02:00
|
|
|
# If we're tweaking the curves this kind of tests does not make sense
|
|
|
|
|
# Use integration tests with comparison curves
|
2020-03-31 00:03:21 +02:00
|
|
|
# ADSREnvelopeT.cpp
|
2019-12-13 01:55:24 +01:00
|
|
|
EventEnvelopesT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
MainT.cpp
|
2019-11-30 15:40:13 +01:00
|
|
|
SynthT.cpp
|
2020-03-15 02:09:40 +01:00
|
|
|
CurveT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
RegionTriggersT.cpp
|
2020-02-13 07:37:06 +01:00
|
|
|
FloatHelpersT.cpp
|
2020-06-16 11:32:34 +02:00
|
|
|
RandomHelpersT.cpp
|
2020-02-13 21:42:03 +01:00
|
|
|
WavetablesT.cpp
|
2020-04-13 00:33:16 +02:00
|
|
|
SemaphoreT.cpp
|
2020-06-15 10:59:12 +02:00
|
|
|
SwapAndPopT.cpp
|
2020-05-19 14:51:33 +02:00
|
|
|
TuningT.cpp
|
2020-07-15 11:55:33 +02:00
|
|
|
ConcurrencyT.cpp
|
2020-07-26 19:25:59 +02:00
|
|
|
ModulationsT.cpp
|
2020-08-12 00:31:19 +02:00
|
|
|
LFOT.cpp
|
|
|
|
|
DataHelpers.h
|
|
|
|
|
DataHelpers.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(sfizz_tests ${SFIZZ_TEST_SOURCES})
|
2020-01-19 10:51:21 +01:00
|
|
|
target_link_libraries(sfizz_tests PRIVATE sfizz::sfizz)
|
2020-01-19 09:51:43 +01:00
|
|
|
sfizz_enable_lto_if_needed(sfizz_tests)
|
2020-09-02 00:36:49 +02:00
|
|
|
sfizz_enable_fast_math(sfizz_tests)
|
2020-01-18 17:35:27 +01:00
|
|
|
# target_link_libraries(sfizz_tests PRIVATE absl::strings absl::str_format absl::flat_hash_map cnpy absl::span absl::algorithm)
|
2019-11-23 19:10:37 +01:00
|
|
|
|
2020-02-07 12:44:12 +01:00
|
|
|
find_package(PkgConfig)
|
|
|
|
|
if(PKGCONFIG_FOUND)
|
2020-02-16 18:22:49 +01:00
|
|
|
pkg_check_modules(JACK "jack")
|
2020-02-07 12:44:12 +01:00
|
|
|
endif()
|
|
|
|
|
find_package(Qt5 COMPONENTS Widgets)
|
|
|
|
|
|
|
|
|
|
if(JACK_FOUND AND TARGET Qt5::Widgets)
|
|
|
|
|
add_executable(sfizz_demo_filters DemoFilters.cpp)
|
|
|
|
|
target_include_directories(sfizz_demo_filters PRIVATE ${JACK_INCLUDE_DIRS})
|
|
|
|
|
target_link_libraries(sfizz_demo_filters PRIVATE sfizz::sfizz Qt5::Widgets ${JACK_LIBRARIES})
|
|
|
|
|
set_target_properties(sfizz_demo_filters PROPERTIES AUTOUIC ON)
|
2020-02-10 16:16:15 +01:00
|
|
|
|
2020-04-18 20:12:29 +02:00
|
|
|
add_executable(sfizz_demo_smooth DemoSmooth.cpp)
|
|
|
|
|
target_include_directories(sfizz_demo_smooth PRIVATE ${JACK_INCLUDE_DIRS})
|
|
|
|
|
target_link_libraries(sfizz_demo_smooth PRIVATE sfizz::sfizz Qt5::Widgets ${JACK_LIBRARIES})
|
|
|
|
|
set_target_properties(sfizz_demo_smooth PROPERTIES AUTOUIC ON)
|
|
|
|
|
|
2020-02-10 16:16:15 +01:00
|
|
|
add_executable(sfizz_demo_stereo DemoStereo.cpp)
|
|
|
|
|
target_include_directories(sfizz_demo_stereo PRIVATE ${JACK_INCLUDE_DIRS})
|
|
|
|
|
target_link_libraries(sfizz_demo_stereo PRIVATE sfizz::sfizz Qt5::Widgets ${JACK_LIBRARIES})
|
|
|
|
|
set_target_properties(sfizz_demo_stereo PROPERTIES AUTOUIC ON)
|
2020-02-14 01:45:50 +01:00
|
|
|
|
|
|
|
|
add_executable(sfizz_demo_wavetables DemoWavetables.cpp)
|
|
|
|
|
target_include_directories(sfizz_demo_wavetables PRIVATE ${JACK_INCLUDE_DIRS})
|
|
|
|
|
target_link_libraries(sfizz_demo_wavetables PRIVATE sfizz::sfizz Qt5::Widgets ${JACK_LIBRARIES})
|
|
|
|
|
set_target_properties(sfizz_demo_wavetables PROPERTIES AUTOUIC ON)
|
2020-03-14 17:36:26 +01:00
|
|
|
|
|
|
|
|
add_executable(sfizz_demo_parser DemoParser.cpp)
|
2020-03-17 18:37:20 +01:00
|
|
|
target_link_libraries(sfizz_demo_parser PRIVATE sfizz_parser Qt5::Widgets)
|
2020-03-14 17:36:26 +01:00
|
|
|
set_target_properties(sfizz_demo_parser PROPERTIES AUTOUIC ON)
|
2020-06-11 20:39:04 +02:00
|
|
|
|
|
|
|
|
add_executable(sfizz_demo_stretch_tuning DemoStretchTuning.cpp)
|
|
|
|
|
target_link_libraries(sfizz_demo_stretch_tuning PRIVATE sfizz::sfizz Qt5::Widgets)
|
|
|
|
|
set_target_properties(sfizz_demo_stretch_tuning PROPERTIES AUTOUIC ON)
|
2020-02-07 12:44:12 +01:00
|
|
|
endif()
|
|
|
|
|
|
2020-02-16 18:22:49 +01:00
|
|
|
add_executable(eq_apply EQ.cpp)
|
|
|
|
|
target_link_libraries(eq_apply PRIVATE sfizz::sfizz)
|
|
|
|
|
|
|
|
|
|
add_executable(filter_apply Filter.cpp)
|
|
|
|
|
target_link_libraries(filter_apply PRIVATE sfizz::sfizz)
|
|
|
|
|
|
2020-03-03 13:11:31 +01:00
|
|
|
add_executable(sfizz_plot_curve PlotCurve.cpp)
|
|
|
|
|
target_link_libraries(sfizz_plot_curve PRIVATE sfizz::sfizz)
|
2020-02-16 18:22:49 +01:00
|
|
|
|
2020-02-13 14:39:28 +01:00
|
|
|
add_executable(sfizz_plot_wavetables PlotWavetables.cpp)
|
|
|
|
|
target_link_libraries(sfizz_plot_wavetables PRIVATE sfizz::sfizz)
|
|
|
|
|
|
2020-08-05 01:00:01 +02:00
|
|
|
add_executable(sfizz_plot_lfo PlotLFO.cpp)
|
|
|
|
|
target_link_libraries(sfizz_plot_lfo PRIVATE sfizz::sfizz)
|
|
|
|
|
|
2020-05-17 15:16:05 +02:00
|
|
|
add_executable(sfizz_file_instrument FileInstrument.cpp)
|
|
|
|
|
target_link_libraries(sfizz_file_instrument PRIVATE sfizz::sfizz)
|
|
|
|
|
|
2020-08-09 23:45:19 +02:00
|
|
|
add_executable(sfizz_file_wavetable FileWavetable.cpp)
|
|
|
|
|
target_link_libraries(sfizz_file_wavetable PRIVATE sfizz::sfizz)
|
|
|
|
|
|
2020-05-19 14:51:33 +02:00
|
|
|
add_executable(sfizz_tuning Tuning.cpp)
|
|
|
|
|
target_link_libraries(sfizz_tuning PRIVATE sfizz::sfizz)
|
|
|
|
|
|
2019-11-30 14:50:57 +01:00
|
|
|
file(COPY "." DESTINATION ${CMAKE_BINARY_DIR}/tests)
|