diff --git a/CMakeLists.txt b/CMakeLists.txt index 644ed5b8..cff21517 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,6 @@ endif() if (UNIX) add_compile_options(-Wall) add_compile_options(-Wextra) - # add_compile_options(-fno-exceptions) - # add_compile_options(-fno-rtti) add_compile_options(-ffast-math) add_compile_options(-fno-omit-frame-pointer) endif() @@ -30,21 +28,27 @@ endif() message("Cmake flags: ${CMAKE_CXX_FLAGS}") -# Check SIMD -set(USE_SIMD OFF) -include(CheckIncludeFiles) -CHECK_INCLUDE_FILES(x86intrin.h HAVE_X86INTRIN_H) -CHECK_INCLUDE_FILES(intrin.h HAVE_INTRIN_H) -CHECK_INCLUDE_FILES(arm_neon.h HAVE_ARM_NEON_H) +# Export the compile_commands.json file +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +find_package(Git QUIET) +if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") +# Update submodules as needed + option(GIT_SUBMODULE "Check submodules during build" ON) + if(GIT_SUBMODULE) + message(STATUS "Submodule update") + execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_SUBMOD_RESULT) + if(NOT GIT_SUBMOD_RESULT EQUAL "0") + message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") + endif() + endif() +endif() # Build options and includes set(BUILD_TESTING OFF CACHE BOOL "Disable Abseil's tests") -set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable Google Benchmark tests") -set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Disable Google Benchmark install") add_subdirectory(external/abseil-cpp EXCLUDE_FROM_ALL) -add_subdirectory(external/Catch2 EXCLUDE_FROM_ALL) -add_subdirectory(external/benchmark EXCLUDE_FROM_ALL) -add_subdirectory(external/cnpy EXCLUDE_FROM_ALL) # Download libsndfile if (WIN32) @@ -64,120 +68,16 @@ endif() add_library(readerwriterqueue INTERFACE) target_include_directories(readerwriterqueue INTERFACE "external/readerwriterqueue") -# Export the compile_commands.json file -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +add_subdirectory(sfizz) +add_subdirectory(clients) -set(COMMON_SOURCES - sources/Opcode.cpp - sources/Synth.cpp - sources/FilePool.cpp - sources/Region.cpp - sources/Voice.cpp - sources/ScopedFTZ.cpp - sources/SfzHelpers.cpp - sources/FloatEnvelopes.cpp - sources/Parser.cpp -) +# Tests +add_subdirectory(external/Catch2 EXCLUDE_FROM_ALL) +add_subdirectory(external/cnpy EXCLUDE_FROM_ALL) +add_subdirectory(tests) -set(SSE_SOURCES - -) - -if (HAVE_X86INTRIN_H AND UNIX) - add_compile_options(-DHAVE_X86INTRIN_H) - add_compile_options(-DUSE_SIMD) - set(COMMON_SOURCES ${COMMON_SOURCES} sources/SIMDSSE.cpp) -elseif (HAVE_INTRIN_H AND WIN32) - add_compile_options(/DHAVE_INTRIN_H) - add_compile_options(/DUSE_SIMD) - set(COMMON_SOURCES ${COMMON_SOURCES} sources/SIMDSSE.cpp) -elseif (HAVE_ARM_NEON_H AND UNIX) - add_compile_options(-DUSE_SIMD) - add_compile_options(-DHAVE_ARM_NEON_H) - set(COMMON_SOURCES ${COMMON_SOURCES} sources/SIMDDummy.cpp) -else() - set(COMMON_SOURCES ${COMMON_SOURCES} sources/SIMDDummy.cpp) -endif() - -set(TEST_SOURCES - tests/RegexT.cpp - tests/HelpersT.cpp - tests/RegionT.cpp - tests/RangeT.cpp - tests/OpcodeT.cpp - tests/BufferT.cpp - tests/StereoBufferT.cpp - tests/SIMDHelpersT.cpp - tests/FilesT.cpp - tests/OnePoleFilterT.cpp - tests/RegionActivationT.cpp - tests/RegionCrossfadesT.cpp - tests/ADSREnvelopeT.cpp - tests/LinearEnvelopeT.cpp - tests/MainT.cpp - tests/RegionTriggersT.cpp -) - -############################### -add_executable(sfzprint sources/ParserMain.cpp sources/Opcode.cpp sources/Parser.cpp) -# Per OS properties -if(UNIX) - target_link_libraries(sfzprint stdc++fs) -endif(UNIX) -target_link_libraries(sfzprint absl::strings absl::flags_parse) - - -############################### -# Basic command line program -add_executable(sfizz sources/Main.cpp ${COMMON_SOURCES}) -# Per OS properties -if(UNIX) - target_compile_options(sfizz PRIVATE -fno-rtti -fno-exceptions) - target_link_libraries(sfizz stdc++fs) -endif(UNIX) -target_link_libraries(sfizz jack absl::strings sndfile absl::flat_hash_map readerwriterqueue absl::flags_parse) - -############################### -# Test application -add_executable(sfizz_tests ${TEST_SOURCES} ${COMMON_SOURCES}) -# Per OS properties -if(UNIX) - target_link_libraries(sfizz_tests stdc++fs) -endif(UNIX) -target_link_libraries(sfizz_tests Catch2::Catch2 absl::strings absl::str_format absl::flat_hash_map sndfile readerwriterqueue cnpy-static absl::span absl::algorithm) -target_include_directories(sfizz_tests SYSTEM PRIVATE sources) -file(COPY "tests" DESTINATION ${CMAKE_BINARY_DIR}) - -############################### -add_executable(bm_opf_high_vs_low benchmarks/BM_OPF_high_vs_low.cpp) -target_link_libraries(bm_opf_high_vs_low benchmark absl::span) - -add_executable(bm_write benchmarks/BM_writeInterleaved.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_write benchmark absl::span) - -add_executable(bm_read benchmarks/BM_readInterleaved.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_read benchmark absl::span) - -add_executable(bm_fill benchmarks/BM_fill.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_fill benchmark absl::span) - -add_executable(bm_mathfuns benchmarks/BM_mathfuns.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_mathfuns benchmark absl::span) - -add_executable(bm_gain benchmarks/BM_gain.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_gain benchmark absl::span) - -add_executable(bm_looping benchmarks/BM_looping.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_looping benchmark absl::span absl::algorithm) - -add_executable(bm_saturating benchmarks/BM_saturating.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_saturating benchmark absl::span absl::algorithm) - -add_executable(bm_ramp benchmarks/BM_ramp.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_ramp benchmark absl::span absl::algorithm) - -add_executable(bm_ADSR benchmarks/BM_ADSR.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_ADSR benchmark absl::span absl::algorithm) - -add_executable(bm_add benchmarks/BM_add.cpp sources/SIMDSSE.cpp) -target_link_libraries(bm_add benchmark absl::span absl::algorithm) \ No newline at end of file +# Benchmarks +set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable Google Benchmark tests") +set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Disable Google Benchmark install") +add_subdirectory(external/benchmark EXCLUDE_FROM_ALL) +add_subdirectory(benchmarks) \ No newline at end of file diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt new file mode 100644 index 00000000..71da6bea --- /dev/null +++ b/benchmarks/CMakeLists.txt @@ -0,0 +1,34 @@ +project(sfizz) + +add_executable(bm_opf_high_vs_low BM_OPF_high_vs_low.cpp) +target_link_libraries(bm_opf_high_vs_low benchmark absl::span) + +add_executable(bm_write BM_writeInterleaved.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_write benchmark absl::span) + +add_executable(bm_read BM_readInterleaved.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_read benchmark absl::span) + +add_executable(bm_fill BM_fill.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_fill benchmark absl::span) + +add_executable(bm_mathfuns BM_mathfuns.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_mathfuns benchmark absl::span) + +add_executable(bm_gain BM_gain.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_gain benchmark absl::span) + +add_executable(bm_looping BM_looping.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_looping benchmark absl::span absl::algorithm) + +add_executable(bm_saturating BM_saturating.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_saturating benchmark absl::span absl::algorithm) + +add_executable(bm_ramp BM_ramp.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_ramp benchmark absl::span absl::algorithm) + +add_executable(bm_ADSR BM_ADSR.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_ADSR benchmark absl::span absl::algorithm) + +add_executable(bm_add BM_add.cpp ${SFIZZ_SIMD_SOURCES}) +target_link_libraries(bm_add benchmark absl::span absl::algorithm) \ No newline at end of file diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt new file mode 100644 index 00000000..56fe7532 --- /dev/null +++ b/clients/CMakeLists.txt @@ -0,0 +1,10 @@ +project(sfizz) + +############################### +add_executable(sfzprint sfzprint.cpp) +target_link_libraries(sfzprint sfizz::parser absl::flags_parse) + +############################### +# Basic command line program +add_executable(sfizz_jack jack_client.cpp) +target_link_libraries(sfizz_jack sfizz::sfizz jack absl::flags_parse) diff --git a/sources/Main.cpp b/clients/jack_client.cpp similarity index 100% rename from sources/Main.cpp rename to clients/jack_client.cpp diff --git a/sources/ParserMain.cpp b/clients/sfzprint.cpp similarity index 99% rename from sources/ParserMain.cpp rename to clients/sfzprint.cpp index 8f42270c..e02fb88f 100644 --- a/sources/ParserMain.cpp +++ b/clients/sfzprint.cpp @@ -22,6 +22,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Parser.h" +#include "StringViewHelpers.h" #include #include #include diff --git a/sources/ADSREnvelope.cpp b/sfizz/ADSREnvelope.cpp similarity index 100% rename from sources/ADSREnvelope.cpp rename to sfizz/ADSREnvelope.cpp diff --git a/sources/ADSREnvelope.h b/sfizz/ADSREnvelope.h similarity index 100% rename from sources/ADSREnvelope.h rename to sfizz/ADSREnvelope.h diff --git a/sources/Buffer.h b/sfizz/Buffer.h similarity index 100% rename from sources/Buffer.h rename to sfizz/Buffer.h diff --git a/sources/CCMap.h b/sfizz/CCMap.h similarity index 100% rename from sources/CCMap.h rename to sfizz/CCMap.h diff --git a/sfizz/CMakeLists.txt b/sfizz/CMakeLists.txt new file mode 100644 index 00000000..e30e6c2b --- /dev/null +++ b/sfizz/CMakeLists.txt @@ -0,0 +1,57 @@ +project(sfizz) + +set(SFIZZ_SOURCES + Synth.cpp + FilePool.cpp + Region.cpp + Voice.cpp + ScopedFTZ.cpp + SfzHelpers.cpp + FloatEnvelopes.cpp +) + +# Check SIMD +include(CheckIncludeFiles) +CHECK_INCLUDE_FILES(x86intrin.h HAVE_X86INTRIN_H) +CHECK_INCLUDE_FILES(intrin.h HAVE_INTRIN_H) +CHECK_INCLUDE_FILES(arm_neon.h HAVE_ARM_NEON_H) + +# SIMD checks +if (HAVE_X86INTRIN_H AND UNIX) + add_compile_options(-DHAVE_X86INTRIN_H) + set(SFIZZ_SIMD_SOURCES SIMDSSE.cpp) +elseif (HAVE_INTRIN_H AND WIN32) + add_compile_options(/DHAVE_INTRIN_H) + set(SFIZZ_SIMD_SOURCES SIMDSSE.cpp) +elseif (HAVE_ARM_NEON_H AND UNIX) + add_compile_options(-DHAVE_ARM_NEON_H) + add_compile_options(-mfpu=neon-fp-armv8) + add_compile_options(-march=native) + add_compile_options(-mtune=cortex-a53) + add_compile_options(-funsafe-math-optimizations) + set(SFIZZ_SIMD_SOURCES SIMDNEON.cpp) +else() + set(SFIZZ_SIMD_SOURCES SIMDDummy.cpp) +endif() +set(SFIZZ_SOURCES ${SFIZZ_SOURCES} ${SFIZZ_SIMD_SOURCES}) + +add_library(sfizz_parser STATIC) +target_sources(sfizz_parser PUBLIC Parser.cpp Opcode.cpp) +target_include_directories(sfizz_parser PUBLIC .) +if(UNIX) + target_link_libraries(sfizz_parser PUBLIC stdc++fs) +endif(UNIX) +target_link_libraries(sfizz_parser PRIVATE absl::strings) + +add_library(sfizz STATIC ${SFIZZ_SOURCES}) +target_link_libraries(sfizz PRIVATE sfizz_parser) +target_include_directories(sfizz PUBLIC .) +if(UNIX) + target_link_libraries(sfizz PUBLIC stdc++fs atomic) + target_compile_options(sfizz PRIVATE -fno-rtti -fno-exceptions) +endif(UNIX) +target_link_libraries(sfizz PUBLIC readerwriterqueue) +target_link_libraries(sfizz PRIVATE absl::strings sndfile absl::flat_hash_map) + +add_library(sfizz::parser ALIAS sfizz_parser) +add_library(sfizz::sfizz ALIAS sfizz) \ No newline at end of file diff --git a/sources/Config.h b/sfizz/Config.h similarity index 98% rename from sources/Config.h rename to sfizz/Config.h index 5879a8f9..6329f1cd 100644 --- a/sources/Config.h +++ b/sfizz/Config.h @@ -28,7 +28,7 @@ namespace sfz { namespace config { constexpr float defaultSampleRate { 48000 }; constexpr int defaultSamplesPerBlock { 1024 }; - constexpr int preloadSize { 8192 * 4 }; + constexpr int preloadSize { 8192 * 2 }; constexpr int numChannels { 2 }; constexpr int numVoices { 64 }; constexpr int numLoadingThreads { 4 }; diff --git a/sources/Debug.h b/sfizz/Debug.h similarity index 100% rename from sources/Debug.h rename to sfizz/Debug.h diff --git a/sources/Defaults.h b/sfizz/Defaults.h similarity index 100% rename from sources/Defaults.h rename to sfizz/Defaults.h diff --git a/sources/EGDescription.h b/sfizz/EGDescription.h similarity index 100% rename from sources/EGDescription.h rename to sfizz/EGDescription.h diff --git a/sources/FilePool.cpp b/sfizz/FilePool.cpp similarity index 100% rename from sources/FilePool.cpp rename to sfizz/FilePool.cpp diff --git a/sources/FilePool.h b/sfizz/FilePool.h similarity index 100% rename from sources/FilePool.h rename to sfizz/FilePool.h diff --git a/sources/FloatEnvelopes.cpp b/sfizz/FloatEnvelopes.cpp similarity index 100% rename from sources/FloatEnvelopes.cpp rename to sfizz/FloatEnvelopes.cpp diff --git a/sources/LeakDetector.h b/sfizz/LeakDetector.h similarity index 100% rename from sources/LeakDetector.h rename to sfizz/LeakDetector.h diff --git a/sources/LinearEnvelope.cpp b/sfizz/LinearEnvelope.cpp similarity index 100% rename from sources/LinearEnvelope.cpp rename to sfizz/LinearEnvelope.cpp diff --git a/sources/LinearEnvelope.h b/sfizz/LinearEnvelope.h similarity index 100% rename from sources/LinearEnvelope.h rename to sfizz/LinearEnvelope.h diff --git a/sources/MathHelpers.h b/sfizz/MathHelpers.h similarity index 100% rename from sources/MathHelpers.h rename to sfizz/MathHelpers.h diff --git a/sources/OnePoleFilter.h b/sfizz/OnePoleFilter.h similarity index 100% rename from sources/OnePoleFilter.h rename to sfizz/OnePoleFilter.h diff --git a/sources/Opcode.cpp b/sfizz/Opcode.cpp similarity index 100% rename from sources/Opcode.cpp rename to sfizz/Opcode.cpp diff --git a/sources/Opcode.h b/sfizz/Opcode.h similarity index 100% rename from sources/Opcode.h rename to sfizz/Opcode.h diff --git a/sources/Parser.cpp b/sfizz/Parser.cpp similarity index 100% rename from sources/Parser.cpp rename to sfizz/Parser.cpp diff --git a/sources/Parser.h b/sfizz/Parser.h similarity index 100% rename from sources/Parser.h rename to sfizz/Parser.h diff --git a/sources/Range.h b/sfizz/Range.h similarity index 100% rename from sources/Range.h rename to sfizz/Range.h diff --git a/sources/Region.cpp b/sfizz/Region.cpp similarity index 100% rename from sources/Region.cpp rename to sfizz/Region.cpp diff --git a/sources/Region.h b/sfizz/Region.h similarity index 100% rename from sources/Region.h rename to sfizz/Region.h diff --git a/sources/SIMDDummy.cpp b/sfizz/SIMDDummy.cpp similarity index 100% rename from sources/SIMDDummy.cpp rename to sfizz/SIMDDummy.cpp diff --git a/sources/SIMDHelpers.h b/sfizz/SIMDHelpers.h similarity index 100% rename from sources/SIMDHelpers.h rename to sfizz/SIMDHelpers.h diff --git a/sources/SIMDSSE.cpp b/sfizz/SIMDSSE.cpp similarity index 100% rename from sources/SIMDSSE.cpp rename to sfizz/SIMDSSE.cpp diff --git a/sources/ScopedFTZ.cpp b/sfizz/ScopedFTZ.cpp similarity index 100% rename from sources/ScopedFTZ.cpp rename to sfizz/ScopedFTZ.cpp diff --git a/sources/ScopedFTZ.h b/sfizz/ScopedFTZ.h similarity index 100% rename from sources/ScopedFTZ.h rename to sfizz/ScopedFTZ.h diff --git a/sources/SfzHelpers.cpp b/sfizz/SfzHelpers.cpp similarity index 100% rename from sources/SfzHelpers.cpp rename to sfizz/SfzHelpers.cpp diff --git a/sources/SfzHelpers.h b/sfizz/SfzHelpers.h similarity index 100% rename from sources/SfzHelpers.h rename to sfizz/SfzHelpers.h diff --git a/sources/StereoBuffer.h b/sfizz/StereoBuffer.h similarity index 100% rename from sources/StereoBuffer.h rename to sfizz/StereoBuffer.h diff --git a/sources/StereoSpan.h b/sfizz/StereoSpan.h similarity index 100% rename from sources/StereoSpan.h rename to sfizz/StereoSpan.h diff --git a/sources/StringViewHelpers.h b/sfizz/StringViewHelpers.h similarity index 100% rename from sources/StringViewHelpers.h rename to sfizz/StringViewHelpers.h diff --git a/sources/Synth.cpp b/sfizz/Synth.cpp similarity index 100% rename from sources/Synth.cpp rename to sfizz/Synth.cpp diff --git a/sources/Synth.h b/sfizz/Synth.h similarity index 99% rename from sources/Synth.h rename to sfizz/Synth.h index 05c685c5..f0e82832 100644 --- a/sources/Synth.h +++ b/sfizz/Synth.h @@ -52,7 +52,6 @@ public: void setSamplesPerBlock(int samplesPerBlock) noexcept; void setSampleRate(float sampleRate) noexcept; void renderBlock(StereoSpan buffer) noexcept; - void noteOn(int delay, int channel, int noteNumber, uint8_t velocity) noexcept; void noteOff(int delay, int channel, int noteNumber, uint8_t velocity) noexcept; void cc(int delay, int channel, int ccNumber, uint8_t ccValue) noexcept; diff --git a/sources/Voice.cpp b/sfizz/Voice.cpp similarity index 100% rename from sources/Voice.cpp rename to sfizz/Voice.cpp diff --git a/sources/Voice.h b/sfizz/Voice.h similarity index 100% rename from sources/Voice.h rename to sfizz/Voice.h diff --git a/sources/mathfuns/neon_mathfun.h b/sfizz/mathfuns/neon_mathfun.h similarity index 100% rename from sources/mathfuns/neon_mathfun.h rename to sfizz/mathfuns/neon_mathfun.h diff --git a/sources/mathfuns/sse_mathfun.h b/sfizz/mathfuns/sse_mathfun.h similarity index 100% rename from sources/mathfuns/sse_mathfun.h rename to sfizz/mathfuns/sse_mathfun.h diff --git a/tests/ADSREnvelopeT.cpp b/tests/ADSREnvelopeT.cpp index 2ac3ba39..9afc5407 100644 --- a/tests/ADSREnvelopeT.cpp +++ b/tests/ADSREnvelopeT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/ADSREnvelope.h" +#include "ADSREnvelope.h" #include "catch2/catch.hpp" #include #include diff --git a/tests/BufferT.cpp b/tests/BufferT.cpp index d135bd10..138fc2b9 100644 --- a/tests/BufferT.cpp +++ b/tests/BufferT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Buffer.h" +#include "Buffer.h" #include "catch2/catch.hpp" #include using namespace Catch::literals; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..f5d2cdc5 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,35 @@ +############################### +# Test application + +project(sfizz) + +set(SFIZZ_TEST_SOURCES + RegexT.cpp + HelpersT.cpp + RegionT.cpp + RangeT.cpp + OpcodeT.cpp + BufferT.cpp + StereoBufferT.cpp + SIMDHelpersT.cpp + FilesT.cpp + OnePoleFilterT.cpp + RegionActivationT.cpp + RegionCrossfadesT.cpp + ADSREnvelopeT.cpp + LinearEnvelopeT.cpp + MainT.cpp + RegionTriggersT.cpp +) + +add_executable(sfizz_tests ${SFIZZ_TEST_SOURCES}) +target_link_libraries(sfizz_tests PRIVATE sfizz) + +# Per OS properties +if(UNIX) + target_link_libraries(sfizz_tests PRIVATE stdc++fs atomic) +endif(UNIX) +target_link_libraries(sfizz_tests PRIVATE Catch2::Catch2 absl::strings absl::str_format absl::flat_hash_map sndfile readerwriterqueue cnpy-static absl::span absl::algorithm) +target_include_directories(sfizz_tests SYSTEM PRIVATE sources) + +file(COPY "." DESTINATION ${CMAKE_BINARY_DIR}/tests) \ No newline at end of file diff --git a/tests/FilesT.cpp b/tests/FilesT.cpp index 1f0f7ff5..c43de0fb 100644 --- a/tests/FilesT.cpp +++ b/tests/FilesT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Synth.h" +#include "Synth.h" #include "catch2/catch.hpp" #include using namespace Catch::literals; diff --git a/tests/HelpersT.cpp b/tests/HelpersT.cpp index 51e628e3..c470b37c 100644 --- a/tests/HelpersT.cpp +++ b/tests/HelpersT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/StringViewHelpers.h" +#include "StringViewHelpers.h" #include "catch2/catch.hpp" #include using namespace Catch::literals; diff --git a/tests/LinearEnvelopeT.cpp b/tests/LinearEnvelopeT.cpp index a82ec6a0..d7cf4903 100644 --- a/tests/LinearEnvelopeT.cpp +++ b/tests/LinearEnvelopeT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/LinearEnvelope.h" +#include "LinearEnvelope.h" #include "catch2/catch.hpp" #include #include diff --git a/tests/OnePoleFilterT.cpp b/tests/OnePoleFilterT.cpp index 5067027a..56fe281c 100644 --- a/tests/OnePoleFilterT.cpp +++ b/tests/OnePoleFilterT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/OnePoleFilter.h" +#include "OnePoleFilter.h" #include "catch2/catch.hpp" #include "cnpy.h" #include diff --git a/tests/OpcodeT.cpp b/tests/OpcodeT.cpp index db14ba51..6062fb47 100644 --- a/tests/OpcodeT.cpp +++ b/tests/OpcodeT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Region.h" +#include "Region.h" #include "catch2/catch.hpp" using namespace Catch::literals; diff --git a/tests/RegexT.cpp b/tests/RegexT.cpp index 3e098735..5ee5695a 100644 --- a/tests/RegexT.cpp +++ b/tests/RegexT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Parser.h" +#include "Parser.h" #include "catch2/catch.hpp" using namespace Catch::literals; diff --git a/tests/RegionActivationT.cpp b/tests/RegionActivationT.cpp index 9e3fde4b..34e3d8b4 100644 --- a/tests/RegionActivationT.cpp +++ b/tests/RegionActivationT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Region.h" +#include "Region.h" #include "catch2/catch.hpp" using namespace Catch::literals; diff --git a/tests/RegionCrossfadesT.cpp b/tests/RegionCrossfadesT.cpp index 5484dd46..db2e5bac 100644 --- a/tests/RegionCrossfadesT.cpp +++ b/tests/RegionCrossfadesT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Region.h" +#include "Region.h" #include "catch2/catch.hpp" #include using namespace Catch::literals; diff --git a/tests/RegionT.cpp b/tests/RegionT.cpp index edec8377..cbeb69a2 100644 --- a/tests/RegionT.cpp +++ b/tests/RegionT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Region.h" +#include "Region.h" #include "catch2/catch.hpp" using namespace Catch::literals; diff --git a/tests/RegionTriggersT.cpp b/tests/RegionTriggersT.cpp index 2135d327..a9ffa9e9 100644 --- a/tests/RegionTriggersT.cpp +++ b/tests/RegionTriggersT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/Region.h" +#include "Region.h" #include "catch2/catch.hpp" using namespace Catch::literals; diff --git a/tests/SIMDHelpersT.cpp b/tests/SIMDHelpersT.cpp index f2effab3..dbf691e6 100644 --- a/tests/SIMDHelpersT.cpp +++ b/tests/SIMDHelpersT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/SIMDHelpers.h" +#include "SIMDHelpers.h" #include "catch2/catch.hpp" #include #include diff --git a/tests/StereoBufferT.cpp b/tests/StereoBufferT.cpp index d3141ff3..6c69d239 100644 --- a/tests/StereoBufferT.cpp +++ b/tests/StereoBufferT.cpp @@ -21,7 +21,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "../sources/StereoBuffer.h" +#include "StereoBuffer.h" #include "catch2/catch.hpp" #include using namespace Catch::literals;