Salome HOME
bos #23972 [CEA 19980] sphinxcontrib_napoleon is not needed with Sphinx >= 1.3
[tools/configuration.git] / config / patches / opencv.001_compile.patch
1 diff -Naur opencv-3.2.0_SRC_orig/cmake/OpenCVCompilerOptions.cmake opencv-3.2.0_SRC_modif/cmake/OpenCVCompilerOptions.cmake
2 --- opencv-3.2.0_SRC_orig/cmake/OpenCVCompilerOptions.cmake     2016-12-23 15:54:44.000000000 +0300
3 +++ opencv-3.2.0_SRC_modif/cmake/OpenCVCompilerOptions.cmake    2019-11-14 17:51:34.265254970 +0300
4 @@ -28,17 +28,17 @@
5    set(ENABLE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
6  endif()
7  
8 -if(MINGW OR (X86 AND UNIX AND NOT APPLE))
9 -  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead
10 +if(1 OR MINGW OR (X86 AND UNIX AND NOT APPLE))
11 +  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O0 instead
12    if(CMAKE_COMPILER_IS_GNUCXX)
13      foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
14 -      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
15 +      string(REPLACE "-O3" "-O0" ${flags} "${${flags}}")
16      endforeach()
17    endif()
18  
19    if(CMAKE_COMPILER_IS_GNUCC)
20      foreach(flags CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
21 -      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
22 +      string(REPLACE "-O3" "-O0" ${flags} "${${flags}}")
23      endforeach()
24    endif()
25  endif()