diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-19 08:03:19 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-19 07:54:57 +0200 |
commit | fafae678f6cd8aaca2be8ece501b258160f7fbfa (patch) | |
tree | f3c2a9eae4b38d9d2031080abdfcebc9f3277f65 | |
parent | bb83aba6c98b948c1715b26237980a4ddc87a547 (diff) |
build: Enable RPC_DOC_CHECK on --enable-debug
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/rpc/util.h | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 6dcc5183ea..96fe38fe0d 100644 --- a/configure.ac +++ b/configure.ac @@ -378,6 +378,7 @@ if test "$enable_debug" = "yes"; then AX_CHECK_PREPROC_FLAG([-DDEBUG], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"], [], [$CXXFLAG_WERROR]) AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"], [], [$CXXFLAG_WERROR]) + AX_CHECK_PREPROC_FLAG([-DRPC_DOC_CHECK], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DRPC_DOC_CHECK"], [], [$CXXFLAG_WERROR]) AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR]) AX_CHECK_COMPILE_FLAG([-ftrapv], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"], [], [$CXXFLAG_WERROR]) fi diff --git a/src/rpc/util.h b/src/rpc/util.h index 6e23caff6c..abbc4c66fe 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -22,7 +22,13 @@ #include <variant> #include <vector> -static constexpr bool DEFAULT_RPC_DOC_CHECK{false}; +static constexpr bool DEFAULT_RPC_DOC_CHECK{ +#ifdef RPC_DOC_CHECK + true +#else + false +#endif +}; /** * String used to describe UNIX epoch time in documentation, factored out to a |