mirror of
https://github.com/opencv/opencv.git
synced 2025-06-17 23:51:16 +08:00
cmake: don't undefine passed options
This commit is contained in:
parent
d8ffddd075
commit
971c4ca10b
@ -603,11 +603,13 @@ 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()
|
endif()
|
||||||
|
if(OPENCV_UNSET_UNSUPPORTED_OPTION)
|
||||||
unset(${variable} CACHE)
|
unset(${variable} CACHE)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
unset(__condition)
|
unset(__condition)
|
||||||
unset(__value)
|
unset(__value)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
Loading…
Reference in New Issue
Block a user