From ed0064260008cff6c4a9ef5e03e6520f23aede20 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Tue, 23 Oct 2012 15:52:11 +0400 Subject: [PATCH] Force build with -O2 instead of -O3 on 32-bit linux --- cmake/OpenCVCompilerOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake index e84957b..8981f4b 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake @@ -1,4 +1,4 @@ -if(MINGW) +if(MINGW OR (X86 AND UNIX AND NOT APPLE)) # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead if(CMAKE_COMPILER_IS_GNUCXX) foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG) -- 2.7.4