Lines Matching full:name
12 # 3. Neither the name of the copyright holder nor the
52 macro(ot_option name ot_config description)
53 # Declare an (ON/OFF/unspecified) OT cmake config with `name`
59 # specified". In this case, the variable `name` would still be
64 set(${name} ${ARGN} CACHE STRING "enable ${description}")
66 set(${name} "" CACHE STRING "enable ${description}")
69 set_property(CACHE ${name} PROPERTY STRINGS ${OT_CONFIG_VALUES})
71 string(COMPARE EQUAL "${${name}}" "" is_empty)
73 message(STATUS "${name}=\"\"")
74 elseif (${name})
75 message(STATUS "${name}=ON --> ${ot_config}=1")
78 message(STATUS "${name}=OFF --> ${ot_config}=0")
83 macro(ot_string_option name ot_config description)
84 # Declare a string OT cmake config with `name` mapping to
92 set(${name} ${ARGN} CACHE STRING "${description}")
94 set(${name} "" CACHE STRING "${description}")
97 set_property(CACHE ${name} PROPERTY STRINGS "")
99 string(COMPARE EQUAL "${${name}}" "" is_empty)
101 message(STATUS "${name}=\"\"")
103 message(STATUS "${name}=\"${${name}}\" --> ${ot_config}=\"${${name}}\"")
104 target_compile_definitions(ot-config INTERFACE "${ot_config}=\"${${name}}\"")
108 macro(ot_int_option name ot_config description)
109 # Declares a integer-value OT cmake config with `name` mapping to
116 set(${name} ${ARGN} CACHE STRING "${description}")
118 set(${name} "" CACHE STRING "${description}")
121 set_property(CACHE ${name} PROPERTY STRINGS "")
123 string(COMPARE EQUAL "${${name}}" "" is_empty)
125 message(STATUS "${name}=\"\"")
126 elseif("${${name}}" MATCHES "^[0-9]+$")
127 message(STATUS "${name}=\"${${name}}\" --> ${ot_config}=${${name}}")
128 target_compile_definitions(ot-config INTERFACE "${ot_config}=${${name}}")
130 message(FATAL_ERROR "${name}=\"${${name}}\" - invalid value, must be integer")
134 macro(ot_multi_option name values ot_config ot_value_prefix description)
135 # Declares a multi-value OT cmake config with `name` with valid
144 set(${name} ${ARGN} CACHE STRING "${description}")
146 set(${name} "" CACHE STRING "${description}")
149 set_property(CACHE ${name} PROPERTY STRINGS "${${values}}")
151 string(COMPARE EQUAL "${${name}}" "" is_empty)
153 message(STATUS "${name}=\"\"")
155 list(FIND ${values} "${${name}}" ot_index)
157 … message(FATAL_ERROR "${name}=\"${${name}}\" - unknown value, valid values " "${${values}}")
159 message(STATUS "${name}=\"${${name}}\" --> ${ot_config}=${ot_value_prefix}${${name}}")
160 … target_compile_definitions(ot-config INTERFACE "${ot_config}=${ot_value_prefix}${${name}}")
329 ot_string_option(OT_VENDOR_NAME OPENTHREAD_CONFIG_NET_DIAG_VENDOR_NAME "set the vendor name config")
366 macro(ot_removed_option name error)
369 get_property(is_set CACHE ${name} PROPERTY VALUE SET)
371 message(FATAL_ERROR "Removed option ${name} is set - ${error}")