Commit 9d24c8b2 authored by Ernestas Kulik's avatar Ernestas Kulik 🦑 Committed by Philip Withnall

build: meson: add warning flags

Courtesy of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
parent aef0e694
......@@ -269,6 +269,27 @@ foreach m : struct_members
endif
endforeach
# Compiler flags
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
test_c_args = [
'-Wall',
'-Wduplicated-branches',
'-Wstrict-prototypes',
'-Werror=declaration-after-statement',
'-Werror=format=2',
'-Werror=format-security',
'-Werror=implicit-function-declaration',
'-Werror=init-self',
'-Werror=missing-include-dirs',
'-Werror=missing-prototypes',
'-Werror=pointer-arith',
]
else
test_c_args = []
endif
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
# Windows Support (Vista+)
if host_system == 'windows'
glib_conf.set('_WIN32_WINNT', '0x0601')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment