build: add hexagonrpcd_verbose option

There is extra debug logging in the code which can be activated by
`meson configure build -Dc_args=-DHEXAGONRPC_VERBOSE`. This may be
difficult to trigger, since it requires -D twice in the same argument.
Add the hexagonrpcd_verbose option to make it easier to configure the
extra logging.

This can be activated with `-Dhexagonrpcd_verbose=true` and deactivated
with `-Dhexagonrpcd_verbose=false`.
This commit is contained in:
Richard Acayan
2024-04-11 17:53:01 -04:00
parent b7ad1021a2
commit 30fa49eb20
2 changed files with 6 additions and 0 deletions

View File

@@ -5,6 +5,10 @@ client_target = get_option('libexecdir') / 'hexagonrpc'
cflags = ['-Wall', '-Wextra', '-Wpedantic', '-Wno-unused-parameter']
if get_option('hexagonrpcd_verbose')
cflags += '-DHEXAGONRPC_VERBOSE'
endif
subdir('libhexagonrpc')
subdir('hexagonrpcd')
subdir('chrecd')

2
meson.options Normal file
View File

@@ -0,0 +1,2 @@
option('hexagonrpcd_verbose', type : 'boolean', value : true,
description : 'Compile hexagonrpcd with extra logging for each remote method invocation')