diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/meson.build b/meson.build index 6f10ccdf..304e6330 100644 --- a/meson.build +++ b/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' |