|
|
|
@ -75,11 +75,25 @@ if(NOT MSVC) |
|
|
|
|
add_extra_compiler_option(-fsigned-char) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(CV_ICC AND NOT ENABLE_FAST_MATH) |
|
|
|
|
if(MSVC) |
|
|
|
|
add_extra_compiler_option("/fp:precise") |
|
|
|
|
else() |
|
|
|
|
add_extra_compiler_option("-fp-model precise") |
|
|
|
|
if(MSVC) |
|
|
|
|
if(NOT " ${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_CXX_FLAGS}" MATCHES " /fp:") |
|
|
|
|
if(ENABLE_FAST_MATH) |
|
|
|
|
add_extra_compiler_option("/fp:fast") |
|
|
|
|
else() |
|
|
|
|
add_extra_compiler_option("/fp:precise") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
elseif(CV_ICC) |
|
|
|
|
if(NOT " ${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_CXX_FLAGS}" MATCHES " /fp:" |
|
|
|
|
AND NOT " ${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_CXX_FLAGS}" MATCHES " -fp-model" |
|
|
|
|
) |
|
|
|
|
if(NOT ENABLE_FAST_MATH) |
|
|
|
|
add_extra_compiler_option("-fp-model precise") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
elseif(CV_GCC OR CV_CLANG) |
|
|
|
|
if(ENABLE_FAST_MATH) |
|
|
|
|
add_extra_compiler_option(-ffast-math) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
@ -165,9 +179,6 @@ if(CV_GCC OR CV_CLANG) |
|
|
|
|
elseif(DEFINED ENABLE_OMIT_FRAME_POINTER) |
|
|
|
|
add_extra_compiler_option(-fno-omit-frame-pointer) |
|
|
|
|
endif() |
|
|
|
|
if(ENABLE_FAST_MATH) |
|
|
|
|
add_extra_compiler_option(-ffast-math) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
# Profiling? |
|
|
|
|
if(ENABLE_PROFILING) |
|
|
|
|