Commit 971c4ca1 authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: don't undefine passed options

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