26 lines
679 B
Meson
26 lines
679 B
Meson
project('server', 'cpp', default_options: ['cpp_std=c++20'])
|
|
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: cpp_flags,
|
|
link_args: link_flags
|
|
)
|
|
|
|
run_target('run', command: server)
|