mirror of
https://codeberg.org/armin/monoslicer.git
synced 2026-10-11 21:11:53 +02:00
Add drag-and-drop regression test and build targets
This commit is contained in:
parent
ca6f1ff0ee
commit
f28e4d37c5
7 changed files with 329 additions and 39 deletions
|
|
@ -90,6 +90,42 @@ target_link_libraries(Monoslicer
|
|||
juce::juce_recommended_lto_flags
|
||||
)
|
||||
|
||||
# Drag and drop regression test. Off by default: a console app needs its own copy
|
||||
# of the JUCE modules, so building it by default would roughly double build time.
|
||||
# Enable with -DMONOSLICER_BUILD_TESTS=ON, or just use `make test`.
|
||||
option(MONOSLICER_BUILD_TESTS "Build the test executables" OFF)
|
||||
|
||||
if(MONOSLICER_BUILD_TESTS)
|
||||
juce_add_console_app(MonoslicerDnDTest
|
||||
PRODUCT_NAME "MonoslicerDnDTest"
|
||||
)
|
||||
target_sources(MonoslicerDnDTest PRIVATE
|
||||
Tests/DragAndDropTest.cpp
|
||||
Source/PluginProcessor.cpp
|
||||
Source/PluginEditor.cpp
|
||||
Source/SliceManager.cpp
|
||||
Source/WaveformDisplay.cpp
|
||||
Source/PianoRollDisplay.cpp
|
||||
)
|
||||
target_compile_definitions(MonoslicerDnDTest PUBLIC
|
||||
JUCE_WEB_BROWSER=0
|
||||
JUCE_USE_CURL=0
|
||||
JUCE_VST3_CAN_REPLACE_VST2=0
|
||||
JucePlugin_Name="Monoslicer"
|
||||
GIT_VERSION="${GIT_VERSION}"
|
||||
# handleDragDrop() defers filesDropped() via MessageManager::callAsync, so the
|
||||
# test needs to be able to pump the message loop to observe it.
|
||||
JUCE_MODAL_LOOPS_PERMITTED=1
|
||||
)
|
||||
target_link_libraries(MonoslicerDnDTest
|
||||
PRIVATE
|
||||
juce::juce_audio_utils
|
||||
juce::juce_audio_processors
|
||||
juce::juce_audio_formats
|
||||
juce::juce_dsp
|
||||
)
|
||||
endif()
|
||||
|
||||
# Suppress JUCE / VST3 SDK warnings globally for all targets.
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue