diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-15 12:18:04 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-18 21:39:33 +0000 |
commit | 60f78f7e9e984802290a483535db208152008472 (patch) | |
tree | 181e3d60c8c9fda5066b11119488f09b81838eee /girepository/cmph/meson.build | |
parent | 5d00d872012a20ce3e7bd6421d81780fd9a09e52 (diff) | |
download | gobject-introspection-60f78f7e9e984802290a483535db208152008472.tar.gz |
meson: add default compiler warning flags and enable -Werror on CI
This enables various compiler warnings project wide and disables the triggered
ones for each library/executable. This should give us roughly the same behaviour
as with autotools.
Tested with gcc8 and clang7.
Diffstat (limited to 'girepository/cmph/meson.build')
-rw-r--r-- | girepository/cmph/meson.build | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/girepository/cmph/meson.build b/girepository/cmph/meson.build index 368afc7b..77c6e696 100644 --- a/girepository/cmph/meson.build +++ b/girepository/cmph/meson.build @@ -29,9 +29,20 @@ cmph_deps = [ cc.find_library('m', required: false), ] +custom_c_args = cc.get_supported_arguments([ + '-Wno-implicit-fallthrough', + '-Wno-old-style-definition', + '-Wno-strict-prototypes', + '-Wno-suggest-attribute=noreturn', + '-Wno-type-limits', + '-Wno-undef', + '-Wno-unused-parameter', + '-Wno-cast-align', + '-Wno-unused-function', +]) cmph = static_library('cmph', sources: cmph_sources, - c_args: gi_hidden_visibility_cflags, + c_args: gi_hidden_visibility_cflags + custom_c_args, dependencies: cmph_deps, ) @@ -40,11 +51,17 @@ cmph_dep = declare_dependency( include_directories: include_directories('.'), ) +custom_c_args = cc.get_supported_arguments([ + '-Wno-old-style-definition', + '-Wno-strict-prototypes', + '-Wno-type-limits', +]) cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c', dependencies: [ cmph_dep, glib_dep, - ] + ], + c_args: custom_c_args, ) test('cmph-bdz-test', cmph_test) |