mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #11333 from alalek:cmake_fix_native
This commit is contained in:
commit
29dd115e9e
@ -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