build: don't use cc.get_supported_arguments for defines
If the compiler errors out on some -DXXX flag, then we're in trouble. Avoid using cc.get_supported_arguments for defines we require. Only use it for detecting support for warning flags.
This commit is contained in:
parent
88529f0856
commit
69cf5c36e0
1 changed files with 12 additions and 5 deletions
17
meson.build
17
meson.build
|
@ -25,6 +25,18 @@ endif
|
|||
seatdpath = '@0@/@1@/seatd'.format(get_option('prefix'), get_option('bindir'))
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
add_project_arguments(
|
||||
[
|
||||
'-D_XOPEN_SOURCE=700',
|
||||
'-D__BSD_VISIBLE',
|
||||
'-DSEATD_VERSION="@0@"'.format(meson.project_version()),
|
||||
'-DSEATD_DEFAULTPATH="@0@"'.format(defaultpath),
|
||||
'-DSEATD_INSTALLPATH="@0@"'.format(seatdpath),
|
||||
],
|
||||
language: 'c',
|
||||
)
|
||||
|
||||
add_project_arguments(cc.get_supported_arguments(
|
||||
[
|
||||
'-Wundef',
|
||||
|
@ -40,11 +52,6 @@ add_project_arguments(cc.get_supported_arguments(
|
|||
'-Wno-unused-command-line-argument',
|
||||
'-Wvla',
|
||||
'-Wl,--exclude-libs=ALL',
|
||||
'-D_XOPEN_SOURCE=700',
|
||||
'-D__BSD_VISIBLE',
|
||||
'-DSEATD_VERSION="@0@"'.format(meson.project_version()),
|
||||
'-DSEATD_DEFAULTPATH="@0@"'.format(defaultpath),
|
||||
'-DSEATD_INSTALLPATH="@0@"'.format(seatdpath),
|
||||
]),
|
||||
language: 'c',
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue