|
|
|
@ -564,7 +564,11 @@ macro(ocv_check_flag_support lang flag varname base_options) |
|
|
|
|
elseif("_${lang}_" MATCHES "_C_") |
|
|
|
|
set(_lang C) |
|
|
|
|
elseif("_${lang}_" MATCHES "_OBJCXX_") |
|
|
|
|
set(_lang OBJCXX) |
|
|
|
|
if(DEFINED CMAKE_OBJCXX_COMPILER) # CMake 3.16+ and enable_language(OBJCXX) call are required |
|
|
|
|
set(_lang OBJCXX) |
|
|
|
|
else() |
|
|
|
|
set(_lang CXX) |
|
|
|
|
endif() |
|
|
|
|
else() |
|
|
|
|
set(_lang ${lang}) |
|
|
|
|
endif() |
|
|
|
@ -573,7 +577,9 @@ macro(ocv_check_flag_support lang flag varname base_options) |
|
|
|
|
string(REGEX REPLACE "^(/|-)" "HAVE_${_lang}_" ${varname} "${${varname}}") |
|
|
|
|
string(REGEX REPLACE " -|-|=| |\\.|," "_" ${varname} "${${varname}}") |
|
|
|
|
|
|
|
|
|
ocv_check_compiler_flag("${_lang}" "${base_options} ${flag}" ${${varname}} ${ARGN}) |
|
|
|
|
if(DEFINED CMAKE_${_lang}_COMPILER) |
|
|
|
|
ocv_check_compiler_flag("${_lang}" "${base_options} ${flag}" ${${varname}} ${ARGN}) |
|
|
|
|
endif() |
|
|
|
|
endmacro() |
|
|
|
|
|
|
|
|
|
macro(ocv_check_runtime_flag flag result) |
|
|
|
|