mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-22 20:51:20 +00:00
CMake: Set -ffinite-math-only so math functions get inlined
if this is not set, using fminf() actually calls that libm function, if it is set, a CPU instruction that calculates the minimum is generated instead. likely similar for other functions. not sure if this causes trouble anywhere, but I don't think we rely on NaN or INF?
This commit is contained in:
parent
ac6ec0cc45
commit
c394fde58a
1 changed files with 3 additions and 3 deletions
|
@ -322,9 +322,9 @@ if(D3_COMPILER_IS_GCC_OR_CLANG)
|
||||||
set(CMAKE_C_FLAGS_DEBUG "-g -ggdb -D_DEBUG -O0")
|
set(CMAKE_C_FLAGS_DEBUG "-g -ggdb -D_DEBUG -O0")
|
||||||
set(CMAKE_C_FLAGS_DEBUGALL "-g -ggdb -D_DEBUG")
|
set(CMAKE_C_FLAGS_DEBUGALL "-g -ggdb -D_DEBUG")
|
||||||
set(CMAKE_C_FLAGS_PROFILE "-g -ggdb -D_DEBUG -O1 -fno-omit-frame-pointer")
|
set(CMAKE_C_FLAGS_PROFILE "-g -ggdb -D_DEBUG -O1 -fno-omit-frame-pointer")
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-O2 -fno-math-errno -fno-trapping-math -fomit-frame-pointer")
|
set(CMAKE_C_FLAGS_RELEASE "-O2 -fno-math-errno -fno-trapping-math -ffinite-math-only -fomit-frame-pointer")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -ggdb -O2 -fno-math-errno -fno-trapping-math -fno-omit-frame-pointer")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -ggdb -O2 -fno-math-errno -fno-trapping-math -ffinite-math-only -fno-omit-frame-pointer")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL "-Os -fno-math-errno -fno-trapping-math -fomit-frame-pointer")
|
set(CMAKE_C_FLAGS_MINSIZEREL "-Os -fno-math-errno -fno-trapping-math -ffinite-math-only -fomit-frame-pointer")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUGALL ${CMAKE_C_FLAGS_DEBUGALL})
|
set(CMAKE_CXX_FLAGS_DEBUGALL ${CMAKE_C_FLAGS_DEBUGALL})
|
||||||
set(CMAKE_CXX_FLAGS_PROFILE ${CMAKE_C_FLAGS_PROFILE})
|
set(CMAKE_CXX_FLAGS_PROFILE ${CMAKE_C_FLAGS_PROFILE})
|
||||||
|
|
Loading…
Reference in a new issue