celestia/cmake/FastMath.cmake

12 lines
210 B
CMake

function(EnableFastMath flag)
if(NOT flag)
return()
endif()
if(MSVC)
add_compile_options("/fp:fast")
else()
add_compile_options("-ffast-math -fno-finite-math-only")
endif()
endfunction()