diff options
author | Jonathan Kang <jonathan121537@gmail.com> | 2018-01-08 15:56:10 +0800 |
---|---|---|
committer | Jonathan Kang <jonathan121537@gmail.com> | 2018-01-08 16:03:54 +0800 |
commit | 27b52b9d267977266187a3947073222b81e8a793 (patch) | |
tree | 7ca9f8709cf131bdc41912480c1631eae6959f40 /meson.build | |
parent | f54265f73ead1e052147cc9ff2915dfc3c9cd24d (diff) | |
download | gnome-logs-27b52b9d267977266187a3947073222b81e8a793.tar.gz |
meson: add warning cflags
As a port of AX_COMPILER_FLAGS which is supposed to replace
GNOME_COMPILE_WARNINGS, add needed warning cflags in main meson.build
file.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/meson.build b/meson.build index ff5b766..a46148f 100644 --- a/meson.build +++ b/meson.build @@ -11,7 +11,23 @@ gl_datadir = join_paths(gl_prefix, get_option('datadir')) gl_mandir = join_paths(gl_prefix, get_option('mandir'), 'man1') gl_pkgdatadir = join_paths(gl_datadir, gl_name) -#TODO add debug arguments +# warning cflags +warning_cflags = [ + '-Wall', + '-Wstrict-prototypes', + '-Wnested-externs', + '-Werror=missing-prototypes', + '-Werror=implicit-function-declaration', + '-Werror=pointer-arith', + '-Werror=init-self', + '-Werror=format-security', + '-Werror=format=2', + '-Werror=missing-include-dirs', + '-Werror=return-type' +] +c_compiler = meson.get_compiler('c') +supported_warning_cflags = c_compiler.get_supported_arguments(warning_cflags) +add_global_arguments(supported_warning_cflags, language : 'c') config_h = configuration_data() |