diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2021-10-10 17:25:09 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2021-10-13 13:01:56 +0100 |
commit | 45263b766303a47bcd7193eba3c8e51e4f7555db (patch) | |
tree | a40406731964a843a7b87dc6650a7058c880b8d6 | |
parent | e9154b2236e852ee1ea49e8d5030b79dad234cf9 (diff) | |
download | libgweather-45263b766303a47bcd7193eba3c8e51e4f7555db.tar.gz |
build: Tweak the default warnings
We want the default warnings from Meson for warning_level=2, but we also
want to inject our own compiler arguments.
-rw-r--r-- | libgweather/meson.build | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libgweather/meson.build b/libgweather/meson.build index f650443..c1e8b04 100644 --- a/libgweather/meson.build +++ b/libgweather/meson.build @@ -7,6 +7,22 @@ add_project_arguments([ c_compiler = meson.get_compiler('c') +add_project_arguments(c_compiler.get_supported_arguments([ + # Warnings we care about + '-Wimplicit-fallthrough', + '-Wmisleading-indentation', + '-Wstrict-prototypes', + '-Wunused', + + # We have legacy code and callbacks + '-Wno-unused-parameter', + + '-Werror=format=2', + '-Werror=implicit-function-declaration', + '-Werror=init-self', + '-Werror=missing-include-dirs', +]), language: 'c') + header_subdir = 'libgweather-3.0/libgweather' libgweather_map = meson.current_source_dir() / 'libgweather.map' link_depends = [] |