Skip to content

Commit

Permalink
Add meson option to enable or disable debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Jun 18, 2017
1 parent 158cfd6 commit e22ffe2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
project('ish', 'c', default_options: ['default_library=static'])
add_global_arguments('-std=gnu99', language: 'c')
project('ish', 'c',
default_options: ['default_library=static', 'c_std=gnu99'])

if get_option('debug_log')
add_global_arguments('-DDEBUG_LOG=1', language: 'c')
endif

includes = [include_directories('.')]

Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
option('debug_log', type: 'boolean', value: true)
2 changes: 1 addition & 1 deletion misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <sys/types.h>

// debug output utilities
#if 0
#if DEBUG_LOG
#define TRACE(msg, ...) printf(msg, ##__VA_ARGS__)
#else
#define TRACE(msg, ...) (void)NULL
Expand Down

0 comments on commit e22ffe2

Please sign in to comment.