2025-05-07 17:44:14 -05:00
|
|
|
project('tutorial', 'cpp')
|
2025-05-07 17:30:29 -05:00
|
|
|
|
2025-05-07 17:44:14 -05:00
|
|
|
CC = meson.get_compiler('cpp')
|
2025-05-09 21:01:36 -05:00
|
|
|
target_name = 'main'
|
2025-05-07 17:30:29 -05:00
|
|
|
|
|
|
|
|
zlib = dependency('zlib', version : '1.2.11', static: true, required: true)
|
|
|
|
|
|
2025-05-08 17:58:16 -05:00
|
|
|
files = files('src/main.cpp')
|
2025-05-07 17:44:14 -05:00
|
|
|
|
2025-05-09 21:01:36 -05:00
|
|
|
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: 'cpp')
|
|
|
|
|
add_project_link_arguments('-fsanitize=address', language: 'cpp')
|
|
|
|
|
endif
|
|
|
|
|
add_project_arguments('-DDEBUG', language: 'cpp')
|
|
|
|
|
endif
|
|
|
|
|
|
2025-05-08 17:58:16 -05:00
|
|
|
executable(target_name, files, dependencies: [zlib], include_directories: include_directories('src/include'))
|