25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
macro(enum_option var values description)
|
|
set(${var}_VALUES ${values})
|
|
list(GET ${var}_VALUES 0 default)
|
|
set(${var} "${default}" CACHE STRING "${description}")
|
|
set_property(CACHE ${var} PROPERTY STRINGS ${${var}_VALUES})
|
|
if (NOT ";${${var}_VALUES};" MATCHES ";${${var}};")
|
|
message(FATAL_ERROR "Unknown value ${${var}}. Only -D${var}=${${var}_VALUES} allowed.")
|
|
endif()
|
|
endmacro()
|