1
0
mirror of https://github.com/RPCS3/soundtouch.git synced 2024-11-09 12:22:51 +01:00

Use -O3 instead of -Ofast when targeting Emscripten (WASM)

This commit is contained in:
fwcd 2024-03-02 23:02:06 +01:00
parent f921e5b586
commit 1c6a90804b

View File

@ -3,11 +3,17 @@ project(SoundTouch VERSION 2.3.3 LANGUAGES CXX)
include(GNUInstallDirs) include(GNUInstallDirs)
set(COMPILE_OPTIONS)
if(MSVC) if(MSVC)
set(COMPILE_DEFINITIONS /O2 /fp:fast) set(COMPILE_DEFINITIONS /O2 /fp:fast)
set(COMPILE_OPTIONS )
else() else()
set(COMPILE_OPTIONS -Ofast -Wall -Wextra -Wzero-as-null-pointer-constant -Wno-unknown-pragmas) list(APPEND COMPILE_OPTIONS -Wall -Wextra -Wzero-as-null-pointer-constant -Wno-unknown-pragmas)
if(EMSCRIPTEN)
list(APPEND COMPILE_OPTIONS -O3)
else()
list(APPEND COMPILE_OPTIONS -Ofast)
endif()
endif() endif()
##################### #####################