Commit 5b867b6f authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: fix CPU_BASELINE=NATIVE on MSVS

parent 225c75e4
...@@ -392,7 +392,7 @@ endforeach() ...@@ -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) ...@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment