From 30fa49eb202022f5914b4dc0f78eb942dc44b6db Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Thu, 11 Apr 2024 17:53:01 -0400 Subject: [PATCH] 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`. --- meson.build | 4 ++++ meson.options | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 meson.options diff --git a/meson.build b/meson.build index e1e7f74..c510789 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/meson.options b/meson.options new file mode 100644 index 0000000..62dd8f2 --- /dev/null +++ b/meson.options @@ -0,0 +1,2 @@ +option('hexagonrpcd_verbose', type : 'boolean', value : true, + description : 'Compile hexagonrpcd with extra logging for each remote method invocation')