Browse Source

meson: use array type option

Array type option is supported since 0.44.0.
upstream/latest
Yu Watanabe 4 years ago
committed by Sven Eden
parent
commit
031ec29c2d
  1. 22
      meson.build
  2. 4
      meson_options.txt

22
meson.build

@ -881,27 +881,24 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
# substs.set('DEBUGTTY', get_option('debug-tty'))
#endif // 0
debug = get_option('debug')
enable_debug_hashmap = false
enable_debug_mmap_cache = false
#if 1 /// additional elogind debug mode
enable_debug_elogind = false
#endif // 1
if debug != ''
foreach name : debug.split(',')
if name == 'hashmap'
enable_debug_hashmap = true
elif name == 'mmap-cache'
enable_debug_mmap_cache = true
#if 1 /// additional elogind debug mode
elif name == 'elogind'
enable_debug_elogind = true
#endif // 1
else
message('unknown debug option "@0@", ignoring'.format(name))
endif
endforeach
endif
foreach name : get_option('debug')
if name == 'hashmap'
enable_debug_hashmap = true
elif name == 'mmap-cache'
enable_debug_mmap_cache = true
else
message('unknown debug option "@0@", ignoring'.format(name))
endif
endforeach
conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
#if 1 /// additional elogind debug mode
@ -1911,6 +1908,7 @@ exe = executable('elogind-inhibit',
install_dir : rootbindir)
public_programs += [exe]
executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
user_runtime_dir_sources,
include_directories : includes,

4
meson_options.txt

@ -70,8 +70,8 @@ option('kexec-path', type : 'string', description : 'path to kexec')
# description : 'path to debug shell binary')
# option('debug-tty', type : 'string', value : '/dev/tty9',
# description : 'specify the tty device for debug shell')
# option('debug', type : 'string',
# description : 'enable extra debugging (hashmap,mmap-cache)')
# option('debug', type : 'array', choices : ['hashmap', 'mmap-cache'], value : [],
# description : 'enable extra debugging')
# option('memory-accounting-default', type : 'boolean',
# description : 'enable MemoryAccounting= by default')
#else

Loading…
Cancel
Save