From 0b32e9018b8e1d5d99d3466babf33888d6ab1382 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Wed, 14 Feb 2018 11:49:46 +0100 Subject: Don't enable the extra warnings for msvc Suggested by https://bugzilla.gnome.org/show_bug.cgi?id=784212#c16 --- meson.build | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/meson.build b/meson.build index 824bc304..b920a380 100644 --- a/meson.build +++ b/meson.build @@ -20,8 +20,27 @@ soversion = '0' host_system = host_machine.system() +# Enable extra warnings if compiler supports them. if cc.get_id() == 'msvc' add_project_arguments('/FImsvc_recommended_pragmas.h', language : 'c') +else + foreach arg : [ + '-Wall', + '-Wmissing-include-dirs', + '-Wpointer-arith', + '-Winit-self', + '-Wdeclaration-after-statement', + '-Werror=missing-prototypes', + '-Werror=implicit-function-declaration', + '-Werror=aggregate-return', + '-Werror=format=2', + '-Wstrict-prototypes', + '-Wno-format-zero-length', + ] + if cc.has_argument(arg) + add_project_arguments(arg, language : 'c') + endif + endforeach endif glib_dep = [dependency('glib-2.0', version : '>=2.38'), @@ -58,25 +77,6 @@ if host_machine.system() == 'windows' cdata.set('DLL_EXPORT', 1) endif -# Enable extra warnings if compiler supports them. -foreach arg : [ - '-Wall', - '-Wmissing-include-dirs', - '-Wpointer-arith', - '-Winit-self', - '-Wdeclaration-after-statement', - '-Werror=missing-prototypes', - '-Werror=implicit-function-declaration', - '-Werror=aggregate-return', - '-Werror=format=2', - '-Wstrict-prototypes', - '-Wno-format-zero-length', - ] - if cc.has_argument(arg) - add_project_arguments(arg, language : 'c') - endif -endforeach - ################### # GIO TLS support # ################### -- cgit v1.2.1