mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
meson: enable more compiler warnings
This commit is contained in:
parent
4135fafecd
commit
5445d8aad0
7 changed files with 34 additions and 21 deletions
35
meson.build
35
meson.build
|
|
@ -16,16 +16,31 @@ project(
|
|||
# for a reference about clean library versioning.
|
||||
so_version = ['1', '2', '0']
|
||||
|
||||
add_project_arguments(
|
||||
[
|
||||
'-DWLR_SRC_DIR="@0@"'.format(meson.current_source_dir()),
|
||||
'-DWLR_USE_UNSTABLE',
|
||||
add_project_arguments([
|
||||
'-DWLR_SRC_DIR="@0@"'.format(meson.current_source_dir()),
|
||||
'-DWLR_USE_UNSTABLE',
|
||||
], language: 'c')
|
||||
|
||||
'-Wno-unused-parameter',
|
||||
'-Wundef',
|
||||
],
|
||||
language: 'c',
|
||||
)
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
add_project_arguments(cc.get_supported_arguments([
|
||||
'-Wundef',
|
||||
'-Wlogical-op',
|
||||
'-Wmissing-include-dirs',
|
||||
'-Wold-style-definition',
|
||||
'-Wpointer-arith',
|
||||
'-Winit-self',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wredundant-decls',
|
||||
'-Wimplicit-fallthrough=2',
|
||||
'-Wendif-labels',
|
||||
'-Wstrict-aliasing=2',
|
||||
'-Woverflow',
|
||||
|
||||
'-Wno-missing-braces',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-unused-parameter',
|
||||
]), language: 'c')
|
||||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set10('WLR_HAS_LIBCAP', false)
|
||||
|
|
@ -38,8 +53,6 @@ conf_data.set10('WLR_HAS_XCB_ICCCM', false)
|
|||
|
||||
wlr_inc = include_directories('.', 'include')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
# Clang complains about some zeroed initializer lists (= {0}), even though they
|
||||
# are valid
|
||||
if cc.get_id() == 'clang'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue