CMakeDependentOption
: Macro to provide an option dependent on other optionsThis macro presents an option to the user only if a set of other conditions are true. When the option is not presented a default value is used, but any value set by the user is preserved for when the option is presented again. Example invocation:
OPTION( VAR1"doc" OFF)
MESSAGE(STATUS "${
VAR1}")
CMAKE_DEPENDENT_OPTION( VAR2"doc" OFF " "NOT VAR1" OFF)
MESSAGE(STATUS "${
VAR2}")
VAR1, VAR2는 OFF 상태로 보여지고, 변수값도 OFF, OFF로 저장된다.
OPTION( VAR1"doc" ON)
VAR1만 보여지고, 변수값은 ON, OFF이다.
이 상태에서 CMAKE_DEPENDENT_OPTION( VAR2"doc" OFF "NOT "doc" ON) 경우
VAR1만 보여지고, 변수값은 ON, ON이다.
댓글 없음:
댓글 쓰기