This would currently result in a hard dependency on Valgrind headers
when linking dependent projects to libdbus (see
https://github.com/mesonbuild/meson/pull/10544 for an attempt to
avoid this), so distributions likely don't want to enable this feature
in their main builds of valgrind (although they could enable it in
special debug builds like the one in Debian's dbus-tests package if
desired).
Signed-off-by: Simon McVittie <smcv@collabora.com>
''')
config.set('HAVE_UNIX_FD_PASSING', has_scm_rights)
-valgrind = dependency('valgrind', version: '>=3.6', required: false)
+valgrind = dependency(
+ 'valgrind',
+ version: '>=3.6',
+ required: get_option('valgrind'),
+)
config.set('WITH_VALGRIND', valgrind.found())
if platform_win32ce
description: 'Enable user-session semantics for session bus under systemd'
)
+option(
+ 'valgrind',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Build with Valgrind instrumentation (note that this currently adds a hard dependency on valgrind)'
+)
+
option(
'verbose_mode',
type: 'boolean',