diff --git a/cmake/AddExtraCompilationFlags.cmake b/cmake/AddExtraCompilationFlags.cmake index 19fc1299f8..b6cfa7b8ee 100644 --- a/cmake/AddExtraCompilationFlags.cmake +++ b/cmake/AddExtraCompilationFlags.cmake @@ -83,9 +83,11 @@ if(CMAKE_COMPILER_IS_GNUCXX OR MINGW OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") # add_extra_compiler_option_enabling(-Wfloat-equal ACTIVATE_WARNING_FLOAT_EQUAL OFF) add_extra_compiler_option_enabling(-Wsign-conversion ACTIVATE_WARNING_SIGN_CONVERSION OFF) add_extra_compiler_option_enabling(-Wshadow ACTIVATE_WARNING_SHADOW OFF) + add_extra_compiler_option_enabling(-ffast-math ENABLE_FAST_MATH OFF) elseif(MSVC) # Add specific compilation flags for Windows Visual add_extra_compiler_option_enabling(/Wall ACTIVATE_WARNING_ALL OFF) + add_extra_compiler_option_enabling(/fp:fast ENABLE_FAST_MATH OFF) if(MSVC80 OR MSVC90 OR MSVC10 OR MSVC11 OR MSVC14) # To avoid compiler warning (level 4) C4571, compile with /EHa if you still want # your catch(...) blocks to catch structured exceptions.