Meson有一套自己的定义常量的方式,以BmcWeb举例:
//meson.options
# BMCWEB_SESSION_AUTH
option(
'session-auth',
type: 'feature',
value: 'enabled',
description: 'Enable session authentication',
)//定义了一个option
//meson.build
feature_options = [
...
'session-auth',
...
]
foreach feature_type, feature_list : {
'Feature': feature_options,
'Numeric': int_options,
'String': string_options,
}
summary_dict = {}
&