Enable the fast-math equivalent of MSVC

This commit is contained in:
Jean Pierre Cimalando 2020-11-27 00:08:08 +01:00
parent 9142aaed7b
commit a0e6abceda

View file

@ -81,6 +81,8 @@ endif()
function(sfizz_enable_fast_math NAME) function(sfizz_enable_fast_math NAME)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options("${NAME}" PRIVATE "-ffast-math") target_compile_options("${NAME}" PRIVATE "-ffast-math")
elseif(MSVC)
target_compile_options("${NAME}" PRIVATE "/fp:fast")
endif() endif()
endfunction() endfunction()