summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-04-28 10:14:53 +0200
committerSimon Ser <contact@emersion.fr>2024-04-28 10:14:53 +0200
commit26719fbbe482df718f8ef442ab7f659b1213ccf9 (patch)
tree9e588d53d649a65c1d69c4c042807b3bb6442f87 /meson.build
parentdcb5ebc76adcfef81c1a275ae7ed21a7936cbd7c (diff)
downloadswaybg-26719fbbe482df718f8ef442ab7f659b1213ccf9.tar.gz
swaybg-26719fbbe482df718f8ef442ab7f659b1213ccf9.tar.bz2
build: use cc.get_supported_arguments() for warning options
Diffstat (limited to '')
-rw-r--r--meson.build18
1 files changed, 8 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 2949ee8..d11a754 100644
--- a/meson.build
+++ b/meson.build
@@ -11,22 +11,20 @@ project(
],
)
-add_project_arguments(
- [
- '-Wno-unused-parameter',
- '-Wno-unused-result',
- '-Wundef',
- '-Wvla',
- ],
- 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
-cc = meson.get_compiler('c')
rt = cc.find_library('rt')
wayland_client = dependency('wayland-client')