Fixed most of the floating-point accuracy problems for x86 gcc

This commit is contained in:
Andrey Kamaev
2012-04-25 11:33:11 +00:00
parent a6c261bebd
commit 8d130ff10c
3 changed files with 6 additions and 5 deletions

View File

@@ -109,7 +109,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(X86 OR X86_64)
if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(OPENCV_EXTRA_C_FLAGS_RELEASE "${OPENCV_EXTRA_C_FLAGS_RELEASE} -mfpmath=387")
if(ENABLE_SSE2)
set(OPENCV_EXTRA_C_FLAGS_RELEASE "${OPENCV_EXTRA_C_FLAGS_RELEASE} -mfpmath=sse")# !! important - be on the same wave with x64 compilers
else()
set(OPENCV_EXTRA_C_FLAGS_RELEASE "${OPENCV_EXTRA_C_FLAGS_RELEASE} -mfpmath=387")
endif()
endif()
endif()