Force build with -O2 instead of -O3 on 32-bit linux
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Tue, 23 Oct 2012 11:52:11 +0000 (15:52 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Tue, 23 Oct 2012 11:52:11 +0000 (15:52 +0400)
cmake/OpenCVCompilerOptions.cmake

index e84957b..8981f4b 100644 (file)
@@ -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)