Skip to content

Commit

Permalink
Enable fast math only on msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-jdeligiannis committed Dec 18, 2024
1 parent cbd6f97 commit b12db02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions omm-sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ if ((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES
endif()

if (OMM_ENABLE_FAST_MATH)
set(OMM_COMPILER_COMPILE_OPTIONS_CLANG ${OMM_COMPILER_COMPILE_OPTIONS_CLANG} -ffast-math)
set(OMM_COMPILER_COMPILE_OPTIONS_GCC ${OMM_COMPILER_COMPILE_OPTIONS_GCC} -ffast-math)
# Only enable fast math on msvc right now. It works on other compilers but requires a thurogh analysis of the consequecnes
#set(OMM_COMPILER_COMPILE_OPTIONS_CLANG ${OMM_COMPILER_COMPILE_OPTIONS_CLANG} -ffast-math)
#set(OMM_COMPILER_COMPILE_OPTIONS_GCC ${OMM_COMPILER_COMPILE_OPTIONS_GCC} -ffast-math)
set(OMM_COMPILER_COMPILE_OPTIONS_MSVC ${OMM_COMPILER_COMPILE_OPTIONS_MSVC} /fp:fast)
endif()

Expand Down

0 comments on commit b12db02

Please sign in to comment.