diff --git a/controlplane/acl.cpp b/controlplane/acl.cpp index 19da4a4d..ebdaf3bb 100644 --- a/controlplane/acl.cpp +++ b/controlplane/acl.cpp @@ -10,8 +10,6 @@ #include #include -//#define ACL_DEBUG - #ifdef ACL_DEBUG #define ACL_DEBUGLEVEL (1) #else diff --git a/controlplane/acl/bitset.h b/controlplane/acl/bitset.h index 0b6ff6c9..f6299e5e 100644 --- a/controlplane/acl/bitset.h +++ b/controlplane/acl/bitset.h @@ -4,6 +4,10 @@ #include #include +#ifdef ACL_DEBUG +#include +#endif + namespace acl { diff --git a/meson.build b/meson.build index 890f2ec0..b63e343d 100644 --- a/meson.build +++ b/meson.build @@ -28,6 +28,9 @@ compiler_args += [ '-DYANET_VERSION_CUSTOM=' + get_option('version_custom'), ] +if get_option('enable_acl_debug') + compiler_args += '-DACL_DEBUG' +endif # Add all global arguments at once add_global_arguments(compiler_args, language: 'cpp') diff --git a/meson_options.txt b/meson_options.txt index 7e023a25..474745e1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -41,3 +41,8 @@ option('version_custom', value: 'develop', description: 'Set the custom string version.', yield: true) + +option('enable_acl_debug', + type: 'boolean', + value: false, + description: 'Enable ACL debug flags.')