mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
cmake: fix compiler flags filtering
This commit is contained in:
parent
f1dc26d7ce
commit
6fa23f330f
@ -508,7 +508,7 @@ macro(ocv_warnings_disable)
|
||||
foreach(var ${_flag_vars})
|
||||
foreach(warning ${_gxx_warnings})
|
||||
if(NOT warning MATCHES "^-Wno-")
|
||||
string(REGEX REPLACE "${warning}(=[^ ]*)?" "" ${var} "${${var}}")
|
||||
string(REGEX REPLACE "(^|[ ]+)${warning}(=[^ ]*)?([ ]+|$)" " " ${var} "${${var}}")
|
||||
string(REPLACE "-W" "-Wno-" warning "${warning}")
|
||||
endif()
|
||||
ocv_check_flag_support(${var} "${warning}" _varname "")
|
||||
|
Loading…
Reference in New Issue
Block a user