meson: Use warning_level feature of meson

This is nicer than adding -Wall and gives users more control.

Add -Wno-unused-parameter for now as there are lot of places where
this would need to be changed and it is reasonable in most cases.

Add -Wno-pedantic because it conflicts with
g_signal_handlers_disconnect_*
This commit is contained in:
Benjamin Berg
2020-11-30 16:19:57 +01:00
committed by Benjamin Berg
parent e301779c20
commit 29ed88a50a

View File

@ -3,7 +3,7 @@ project('fprintd', 'c',
license: 'GPLv2+',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',
'warning_level=3',
'c_std=gnu99',
],
meson_version: '>= 0.50.0')
@ -14,7 +14,6 @@ i18n = import('i18n')
cc = meson.get_compiler('c')
common_cflags = cc.get_supported_arguments([
'-fno-strict-aliasing',
'-Wall',
'-Wcast-align',
'-Werror=address',
'-Werror=array-bounds',
@ -53,6 +52,15 @@ common_cflags = cc.get_supported_arguments([
])
add_project_arguments(common_cflags, language: 'c')
common_cflags = cc.get_supported_arguments([
# The stub passes a lot of params that we do not use, maybe a good idea to
# mark it appropriately, but this works well for now.
'-Wno-unused-parameter',
# We use g_signal_handlers_disconnect_* which is not compatible with -Wpedantic
'-Wno-pedantic',
])
add_project_arguments(common_cflags, language: 'c')
host_system = host_machine.system()
glib_min_version = '2.56'
libfprint_min_version = '1.90.1'