--- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake @@ -164,8 +164,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) # Other optimizations if(ENABLE_OMIT_FRAME_POINTER) add_extra_compiler_option(-fomit-frame-pointer) - else() - add_extra_compiler_option(-fno-omit-frame-pointer) endif() if(ENABLE_FAST_MATH) add_extra_compiler_option(-ffast-math) @@ -195,8 +193,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) if(NOT MINGW) if(ENABLE_AVX) add_extra_compiler_option(-mavx) - elseif(X86 OR X86_64) - add_extra_compiler_option(-mno-avx) endif() if(ENABLE_AVX2) add_extra_compiler_option(-mavx2) @@ -210,26 +206,18 @@ if(CMAKE_COMPILER_IS_GNUCXX) if(NOT OPENCV_EXTRA_CXX_FLAGS MATCHES "-mavx") if(ENABLE_SSE3) add_extra_compiler_option(-msse3) - elseif(X86 OR X86_64) - add_extra_compiler_option(-mno-sse3) endif() if(ENABLE_SSSE3) add_extra_compiler_option(-mssse3) - elseif(X86 OR X86_64) - add_extra_compiler_option(-mno-ssse3) endif() if(ENABLE_SSE41) add_extra_compiler_option(-msse4.1) - elseif(X86 OR X86_64) - add_extra_compiler_option(-mno-sse4.1) endif() if(ENABLE_SSE42) add_extra_compiler_option(-msse4.2) - elseif(X86 OR X86_64) - add_extra_compiler_option(-mno-sse4.2) endif() if(ENABLE_POPCNT) @@ -238,16 +226,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif() endif(NOT MINGW) - if(X86 OR X86_64) - if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4) - if(OPENCV_EXTRA_CXX_FLAGS MATCHES "-m(sse2|avx)") - add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers - else() - add_extra_compiler_option(-mfpmath=387) - endif() - endif() - endif() - # Profiling? if(ENABLE_PROFILING) add_extra_compiler_option("-pg -g"