celestia/cmake/FastMath.cmake

12 lines
210 B
CMake
Raw Normal View History

2020-03-02 08:56:46 -07:00
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")
2020-03-02 08:56:46 -07:00
endif()
endfunction()