diff options
| author | Simon Ser <contact@emersion.fr> | 2025-03-18 22:24:13 +0100 |
|---|---|---|
| committer | Kenny Levinsen <kl@kl.wtf> | 2025-03-18 22:31:01 +0100 |
| commit | f18bc29ebe27397bebeeafb1c467f53179c72f81 (patch) | |
| tree | f553a74a9d9719f3380ecdaa826284bbf3eb3dfa /meson.build | |
| parent | 0b10244dc09c7108e7046700a4cd0a64dde57380 (diff) | |
build: use cc.get_supported_arguments() for warnings
Let's not require the C compiler to support specific warnings,
especially if half the flags are used to turn off the warnings
anyways.
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/meson.build b/meson.build index a530a2d..cdbe6ff 100644 --- a/meson.build +++ b/meson.build @@ -11,22 +11,18 @@ project( ], ) -add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: 'c') +cc = meson.get_compiler('c') -add_project_arguments( - [ - '-Wno-unused-parameter', - '-Wno-unused-result', - '-Wundef', - '-Wvla', - ], - language: 'c', -) +add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: 'c') -cc = meson.get_compiler('c') +add_project_arguments(cc.get_supported_arguments([ + '-Wno-unused-parameter', + '-Wno-unused-result', + '-Wundef', + '-Wvla', +]), language: 'c') is_freebsd = host_machine.system().startswith('freebsd') - if is_freebsd add_project_arguments('-D_C11_SOURCE', language: 'c') endif |
