mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
cmake: fix CPU_BASELINE=NATIVE on MSVS
This commit is contained in:
parent
225c75e4a1
commit
5b867b6f1f
@ -392,7 +392,7 @@ endforeach()
|
|||||||
if(_add_native_flag)
|
if(_add_native_flag)
|
||||||
set(_varname "HAVE_CPU_NATIVE_SUPPORT")
|
set(_varname "HAVE_CPU_NATIVE_SUPPORT")
|
||||||
ocv_check_compiler_flag(CXX "-march=native" "${_varname}" "")
|
ocv_check_compiler_flag(CXX "-march=native" "${_varname}" "")
|
||||||
if(_varname)
|
if(${_varname})
|
||||||
set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} -march=native")
|
set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} -march=native")
|
||||||
else()
|
else()
|
||||||
set(_varname "HAVE_CPU_HOST_SUPPORT")
|
set(_varname "HAVE_CPU_HOST_SUPPORT")
|
||||||
@ -402,8 +402,8 @@ if(_add_native_flag)
|
|||||||
set(_flag "-xHost")
|
set(_flag "-xHost")
|
||||||
endif()
|
endif()
|
||||||
ocv_check_compiler_flag(CXX "${_flag}" "${_varname}" "")
|
ocv_check_compiler_flag(CXX "${_flag}" "${_varname}" "")
|
||||||
if(_varname)
|
if(${_varname})
|
||||||
set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} ${flag}")
|
set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} ${_flag}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user