add debug build options
This commit is contained in:
parent
bb49ac9275
commit
0729179401
15
meson.build
15
meson.build
@ -4,11 +4,22 @@ add_project_arguments('-Wno-unused-parameter', language: 'cpp')
|
||||
zlib = dependency('zlib')
|
||||
threads = dependency('threads')
|
||||
|
||||
if get_option('buildtype') == 'debug'
|
||||
cpp_flags = ['-O0', '-g', '-Wall', '-Wextra']
|
||||
link_flags = []
|
||||
elif get_option('buildtype') == 'debugoptimized'
|
||||
cpp_flags = ['-O1', '-g', '-Wall', '-Wextra']
|
||||
link_flags = []
|
||||
else
|
||||
cpp_flags = ['-O3', '-march=native', '-flto', '-Wall', '-Wextra', '-DNDEBUG']
|
||||
link_flags = ['-flto', '-s']
|
||||
endif
|
||||
|
||||
server = executable('server',
|
||||
'main.cpp',
|
||||
dependencies: [zlib, threads],
|
||||
cpp_args: ['-O3', '-march=native', '-flto', '-Wall', '-Wextra', '-DNDEBUG'],
|
||||
link_args: ['-flto', '-s']
|
||||
cpp_args: cpp_flags,
|
||||
link_args: link_flags
|
||||
)
|
||||
|
||||
run_target('run', command: server)
|
||||
|
Loading…
x
Reference in New Issue
Block a user