Commit 21926d62 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

add -mfpmath=sse -msse2 compiler flags: x86/amd64

This may speed things up a little in some places, or maybe not, but
should be safe as few if any users are likely to be using a CPU without
SSE2.
parent afb1cd3d
......@@ -326,12 +326,18 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
ENDIF()
ENDIF(ENABLE_LTO)
unset(MY_C_OPT_FLAGS)
if(X86_32 OR AMD64)
set(MY_C_OPT_FLAGS -mfpmath=sse -msse2)
endif()
# common optimization flags
IF(NOT (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3))
SET(MY_C_OPT_FLAGS -O2 -fomit-frame-pointer ${LTO_FLAGS})
SET(MY_C_OPT_FLAGS ${MY_C_OPT_FLAGS} -O2 -fomit-frame-pointer ${LTO_FLAGS})
ELSE()
# LTO and -fomit-frame-pointer generate broken binaries on Lion with XCode 4.2 tools
SET(MY_C_OPT_FLAGS -O2)
SET(MY_C_OPT_FLAGS ${MY_C_OPT_FLAGS} -O2)
ENDIF()
# only use -mtune=generic on PC architectures
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment