Merge pull request #7159 from keymanapp/feat/core/7136-debug

feat(core): set -DDEBUG for debug 🙀
This commit is contained in:
Steven R. Loomis 2022-08-30 13:20:27 -05:00 committed by GitHub
commit 0e29be0c80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -41,6 +41,11 @@ cc = meson.get_compiler('c')
# For now, we use KMN_KBP to inject the km::kbp::kmx namespace
defns = ['-DKMN_KBP']
# #define DEBUG when we are on a debug build
if get_option('buildtype') == 'debug'
add_global_arguments('-DDEBUG', language : 'cpp')
endif
subdir('doc')
subdir('include')
subdir('src')

View file

@ -15,8 +15,12 @@
* @def KMXPLUS_DEBUG Set to 1 to enable debug output
*/
#ifndef KMXPLUS_DEBUG
#if defined(DEBUG)
#define KMXPLUS_DEBUG 1
#else
#define KMXPLUS_DEBUG 0
#endif
#endif
namespace km {
namespace kbp {