Salome HOME
Finalize OCCT patches
[tools/configuration.git] / config / patches / occt / opencv.001_compile.patch
1 diff -NaurwB opencv-2.4.6.1__0/cmake/OpenCVCompilerOptions.cmake opencv-2.4.6.1__1/cmake/OpenCVCompilerOptions.cmake
2 --- opencv-2.4.6.1__0/cmake/OpenCVCompilerOptions.cmake 2013-07-10 15:49:00.000000000 +0400
3 +++ opencv-2.4.6.1__1/cmake/OpenCVCompilerOptions.cmake 2017-03-15 17:06:11.464387144 +0300
4 @@ -1,14 +1,14 @@
5 -if(MINGW OR (X86 AND UNIX AND NOT APPLE))
6 -  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead
7 +if(1 OR MINGW OR (X86 AND UNIX AND NOT APPLE))
8 +  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O0 instead
9    if(CMAKE_COMPILER_IS_GNUCXX)
10      foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
11 -      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
12 +      string(REPLACE "-O3" "-O0" ${flags} "${${flags}}")
13      endforeach()
14    endif()
15  
16    if(CMAKE_COMPILER_IS_GNUCC)
17      foreach(flags CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
18 -      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
19 +      string(REPLACE "-O3" "-O0" ${flags} "${${flags}}")
20      endforeach()
21    endif()
22  endif()