mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Merge pull request #12901 from alalek:cmake_unsupported_option_warning
This commit is contained in:
commit
467eb4d240
@ -605,10 +605,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)
|
||||||
|
Loading…
Reference in New Issue
Block a user