Merge branch 'optimizations' into 'master'

CMake: set optimization options for MSVC as well as GCC & Clang

See merge request soundtouch/soundtouch!13
This commit is contained in:
Olli Parviainen 2021-08-20 17:57:09 +00:00
commit 6dce1068d9

View File

@ -47,7 +47,12 @@ if(WIN32 AND BUILD_SHARED_LIBS)
endif() endif()
endif() endif()
target_compile_options(SoundTouch PRIVATE -Ofast) if(MSVC)
target_compile_definitions(SoundTouch PRIVATE /O2 /fp:fast)
else()
target_compile_options(SoundTouch PRIVATE -Ofast)
endif()
target_compile_definitions(SoundTouch PRIVATE CMAKE) target_compile_definitions(SoundTouch PRIVATE CMAKE)
option(INTEGER_SAMPLES "Use integers instead of floats for samples" OFF) option(INTEGER_SAMPLES "Use integers instead of floats for samples" OFF)