Unverified Commit 954969dd authored by Alexander Alekhin's avatar Alexander Alekhin Committed by GitHub

Merge pull request #13189 from alalek:cmake_options_warnings_update

parents 43002c0c 53af8115
...@@ -605,7 +605,9 @@ macro(OCV_OPTION variable description value) ...@@ -605,7 +605,9 @@ macro(OCV_OPTION variable description value)
option(${variable} "${description}" ${__value}) option(${variable} "${description}" ${__value})
endif() endif()
else() 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})") message(WARNING "Unexpected option: ${variable} (=${${variable}})\nCondition: IF (${__condition})")
endif() endif()
if(OPENCV_UNSET_UNSUPPORTED_OPTION) if(OPENCV_UNSET_UNSUPPORTED_OPTION)
......
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