Update floating point compilation options

pull/1315/head
Andrew Tribick 2022-01-08 12:45:52 +01:00 committed by ajtribick
parent 56751882e6
commit 3f7bd9c13e
2 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,6 @@ function(EnableFastMath flag)
if(MSVC)
add_compile_options("/fp:fast")
else()
add_compile_options("-ffast-math")
add_compile_options("-ffast-math -fno-finite-math-only")
endif()
endfunction()

View File

@ -1,10 +1,13 @@
if (NOT HAVE_FLOAT_CHARCONV)
if(NOT HAVE_FLOAT_CHARCONV)
set(CELCOMPAT_SOURCES
charconv_impl.cpp
charconv_impl.h
)
endif()
if (CELCOMPAT_SOURCES)
if(CELCOMPAT_SOURCES)
add_library(celcompat OBJECT ${CELCOMPAT_SOURCES})
if(NOT MSVC)
target_compile_options(celcompat PRIVATE -fmath-errno)
endif()
endif()