debug
This commit is contained in:
parent
b386cd166f
commit
b37ec5adf2
8 changed files with 123 additions and 6 deletions
16
meson.build
16
meson.build
|
|
@ -1,11 +1,23 @@
|
|||
project('tutorial', 'c')
|
||||
|
||||
CC = meson.get_compiler('c')
|
||||
target_name = 'main'
|
||||
|
||||
|
||||
zlib = dependency('zlib', version : '1.2.11', static: true, required: true)
|
||||
|
||||
target_name = 'main'
|
||||
|
||||
files = files('src/main.c')
|
||||
|
||||
executable(target_name, files, dependencies: [zlib], include_directories: include_directories('src/include'))
|
||||
if get_option('buildtype') == 'debug'
|
||||
if CC.has_argument('-fsanitize=address') and CC.has_link_argument('-fsanitize=address')
|
||||
add_project_arguments('-fsanitize=address', '-fno-omit-frame-pointer', language: 'c')
|
||||
add_project_link_arguments('-fsanitize=address', language: 'c')
|
||||
endif
|
||||
add_project_arguments('-DDEBUG', language: 'c')
|
||||
endif
|
||||
|
||||
|
||||
executable(target_name, files, dependencies: [zlib], include_directories: include_directories('src/include'))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue