meson: better match autotools cxxflags

Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4
This commit is contained in:
Qyriad 2024-03-16 19:23:19 -06:00
parent f150b3f7f8
commit 7acdcf5511
2 changed files with 12 additions and 2 deletions

View file

@ -1,9 +1,10 @@
project('lix', 'cpp',
version : run_command('bash', '-c', 'echo -n $(cat ./.version)$VERSION_SUFFIX', check : true).stdout().strip(),
default_options : [
'buildtype=debugoptimized',
'cpp_std=c++20',
'warning_level=1',
'debug=true',
'optimization=3',
],
)
@ -206,6 +207,15 @@ add_project_arguments(
'-Wno-unused-parameter',
'-Wno-missing-field-initializers',
'-Wno-deprecated-copy',
'-pthread',
#'-fPIC',
language : 'cpp',
)
# FIXME(Qyriad): only if not Darwin, Solaris, or FreeBSD
# (...so only if Linux?)
add_project_link_arguments(
'-Wl,--no-copy-dt-needed-entries',
language : 'cpp',
)

View file

@ -7,7 +7,7 @@ libmain_sources = files(
)
libmain = library(
'main',
'nixmain',
libmain_sources,
dependencies : [
liblixutil,