diff options
author | Daniel Stone <daniels@collabora.com> | 2022-09-22 14:22:30 +0100 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2022-09-23 11:19:06 +0000 |
commit | 022e79bf3eb163cf649cddcab29a345787df3e00 (patch) | |
tree | 4cf7912861973050fff7a09899cebced6cc72bc3 /meson.build | |
parent | 3240ccc69d1488003c1cfc36d23750145d4f13f7 (diff) | |
download | weston-022e79bf3eb163cf649cddcab29a345787df3e00.tar.gz |
build: Use cc.get_supported_arguments() instead of open-coding
I added support to Meson for cc.get_supported_arguments() when I was
typing out the initial build because I didn't like the open-coding, then
completely forgot to update Weston when it got merged.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/meson.build b/meson.build index 5a552ef7..82cd7c62 100644 --- a/meson.build +++ b/meson.build @@ -60,8 +60,7 @@ config_h = configuration_data() cc = meson.get_compiler('c') -global_args = [] -global_args_maybe = [ +global_args = cc.get_supported_arguments( '-Wmissing-prototypes', '-Wno-unused-parameter', '-Wno-shift-negative-value', # required due to Pixman @@ -69,12 +68,7 @@ global_args_maybe = [ '-Wno-pedantic', '-Wundef', '-fvisibility=hidden', -] -foreach a : global_args_maybe - if cc.has_argument(a) - global_args += a - endif -endforeach +) add_global_arguments(global_args, language: 'c') if cc.has_header_symbol('sys/sysmacros.h', 'major') |