Skip to content

Commit

Permalink
Add -ffast-math as an option (default: not used)
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Jul 6, 2023
1 parent 43c8720 commit 08a979a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/AddExtraCompilationFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 08a979a

Please sign in to comment.