mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-10 09:10:17 +01:00
meson.build: add a few compiler flags
And handle them through the compiler.get_supported_arguments() function in meson. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
5ab50db599
commit
ca34a091ac
1 changed files with 24 additions and 4 deletions
28
meson.build
28
meson.build
|
|
@ -7,10 +7,30 @@ project('libei', 'c',
|
|||
pkgconfig = import('pkgconfig')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
cppflags = ['-Wno-unused-parameter']
|
||||
cflags = cppflags + ['-Wmissing-prototypes', '-Wstrict-prototypes']
|
||||
add_project_arguments(cflags, language: 'c')
|
||||
add_project_arguments(cppflags, language: 'cpp')
|
||||
cflags =[
|
||||
'-Wno-unused-parameter',
|
||||
'-Wmissing-prototypes',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wlogical-op',
|
||||
'-Wpointer-arith',
|
||||
'-Wuninitialized',
|
||||
'-Winit-self',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wimplicit-fallthrough',
|
||||
'-Wredundant-decls',
|
||||
'-Wincompatible-pointer-types',
|
||||
'-Wformat=2',
|
||||
'-Wformat-overflow=2',
|
||||
'-Wformat-signedness',
|
||||
'-Wformat-truncation=2',
|
||||
'-Wmissing-declarations',
|
||||
'-Wshift-overflow=2',
|
||||
'-Wstrict-overflow=2',
|
||||
'-Wswitch',
|
||||
]
|
||||
add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
|
||||
|
||||
config_h = configuration_data()
|
||||
config_h.set('_GNU_SOURCE', '1')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue