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 /tests | |
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 'tests')
-rw-r--r-- | tests/meson.build | 10 | ||||
-rw-r--r-- | tests/repository/meson.build | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/meson.build b/tests/meson.build index 7e633f29..c11151dc 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -46,18 +46,24 @@ test_everything_files = custom_target('everything', test_everything_headers = [test_everything_files[0]] test_everything_sources = [test_everything_files[1]] +custom_c_args = cc.get_supported_arguments([ + '-Wno-unused-parameter', +]) everything_lib = shared_library('everything-1.0', sources: test_everything_sources, include_directories : configinc, - c_args: gi_hidden_visibility_cflags, + c_args: gi_hidden_visibility_cflags + custom_c_args, dependencies: [glib_dep, gobject_dep], version: '1.0.0', ) +custom_c_args = cc.get_supported_arguments([ + '-Wno-unused-parameter', +]) gimarshallingtests_lib = shared_library('gimarshallingtests-1.0', sources: test_marshalling_sources, include_directories : configinc, - c_args: gi_hidden_visibility_cflags, + c_args: gi_hidden_visibility_cflags + custom_c_args, dependencies: [glib_dep, gobject_dep], version: '1.0.0', ) diff --git a/tests/repository/meson.build b/tests/repository/meson.build index 1281427e..3a51a0e3 100644 --- a/tests/repository/meson.build +++ b/tests/repository/meson.build @@ -13,10 +13,15 @@ repository_test_env.append( join_paths(meson.build_root(), 'tests') ) +custom_c_args = cc.get_supported_arguments([ + '-Wno-unused-parameter', +]) if glib_dep.type_name() == 'pkgconfig' foreach test_name : repository_tests source = files(test_name + '.c') - exe = executable(test_name, source, dependencies: [girepo_dep]) + exe = executable(test_name, source, + dependencies: [girepo_dep], + c_args: custom_c_args) test(test_name, exe, env: repository_test_env) endforeach endif |