mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 19:59:08 +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)
|
||||
set(_varname "HAVE_CPU_NATIVE_SUPPORT")
|
||||
ocv_check_compiler_flag(CXX "-march=native" "${_varname}" "")
|
||||
if(_varname)
|
||||
if(${_varname})
|
||||
set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} -march=native")
|
||||
else()
|
||||
set(_varname "HAVE_CPU_HOST_SUPPORT")
|
||||
@ -402,8 +402,8 @@ if(_add_native_flag)
|
||||
set(_flag "-xHost")
|
||||
endif()
|
||||
ocv_check_compiler_flag(CXX "${_flag}" "${_varname}" "")
|
||||
if(_varname)
|
||||
set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} ${flag}")
|
||||
if(${_varname})
|
||||
set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} ${_flag}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user