mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-27 03:42:19 -05:00
f52a2a6406
subrepo: subdir: "OTRGui" merged: "a6066a251" upstream: origin: "https://github.com/HarbourMasters/otrgui.git" branch: "master" commit: "a6066a251" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
10 lines
396 B
CMake
10 lines
396 B
CMake
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()
|