mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
cmake: emit warnings about unsupported options if turned ON only
This commit is contained in:
parent
b58a8729c2
commit
53af811530
@ -605,7 +605,9 @@ macro(OCV_OPTION variable description value)
|
||||
option(${variable} "${description}" ${__value})
|
||||
endif()
|
||||
else()
|
||||
if(DEFINED ${variable} AND NOT OPENCV_HIDE_WARNING_UNSUPPORTED_OPTION)
|
||||
if(DEFINED ${variable} AND "${${variable}}" # emit warnings about turned ON options only.
|
||||
AND NOT (OPENCV_HIDE_WARNING_UNSUPPORTED_OPTION OR "$ENV{OPENCV_HIDE_WARNING_UNSUPPORTED_OPTION}")
|
||||
)
|
||||
message(WARNING "Unexpected option: ${variable} (=${${variable}})\nCondition: IF (${__condition})")
|
||||
endif()
|
||||
if(OPENCV_UNSET_UNSUPPORTED_OPTION)
|
||||
|
Loading…
Reference in New Issue
Block a user