Commit 467eb4d2 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #12901 from alalek:cmake_unsupported_option_warning

parents e5d7f446 971c4ca1
......@@ -605,10 +605,12 @@ macro(OCV_OPTION variable description value)
option(${variable} "${description}" ${__value})
endif()
else()
if(DEFINED ${variable})
# TODO: message(WARNING "Option will be ignored: ${variable} (=${${variable}})")
if(DEFINED ${variable} AND NOT OPENCV_HIDE_WARNING_UNSUPPORTED_OPTION)
message(WARNING "Unexpected option: ${variable} (=${${variable}})\nCondition: IF (${__condition})")
endif()
if(OPENCV_UNSET_UNSUPPORTED_OPTION)
unset(${variable} CACHE)
endif()
unset(${variable} CACHE)
endif()
unset(__condition)
unset(__value)
......
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