opencv-4.4.0-disable-native-cpuflag-detect.patch 1.2 KB

123456789101112131415161718192021222324252627
  1. cmake/OpenCVCompilerOptimizations.cmake | 12 ++++++------
  2. 1 file changed, 6 insertions(+), 6 deletions(-)
  3. diff --git a/cmake/OpenCVCompilerOptimizations.cmake b/cmake/OpenCVCompilerOptimizations.cmake
  4. index 970dd28903..b56892bb12 100644
  5. --- a/cmake/OpenCVCompilerOptimizations.cmake
  6. +++ b/cmake/OpenCVCompilerOptimizations.cmake
  7. @@ -156,12 +156,12 @@ if(";${CPU_BASELINE};" MATCHES ";NATIVE;" OR ";${CPU_BASELINE};" MATCHES ";HOST;
  8. set(_add_native_flag ON)
  9. elseif(";${CPU_BASELINE};" MATCHES ";DETECT;")
  10. set(CPU_BASELINE_DETECT ON)
  11. -elseif(" ${CMAKE_CXX_FLAGS} " MATCHES " -march=native | -xHost | /QxHost ")
  12. - if(DEFINED CPU_BASELINE)
  13. - message(STATUS "CPU: Detected '-march=native' or '-xHost' compiler flag. Force CPU_BASELINE=DETECT.")
  14. - endif()
  15. - set(CPU_BASELINE "DETECT" CACHE STRING "${HELP_CPU_BASELINE}")
  16. - set(CPU_BASELINE_DETECT ON)
  17. +#elseif(" ${CMAKE_CXX_FLAGS} " MATCHES " -march=native | -xHost | /QxHost ")
  18. +# if(DEFINED CPU_BASELINE)
  19. +# message(STATUS "CPU: Detected '-march=native' or '-xHost' compiler flag. Force CPU_BASELINE=DETECT.")
  20. +# endif()
  21. +# set(CPU_BASELINE "DETECT" CACHE STRING "${HELP_CPU_BASELINE}")
  22. +# set(CPU_BASELINE_DETECT ON)
  23. endif()
  24. if(X86 OR X86_64)