diff options
author | Tomas Popela <tpopela@redhat.com> | 2018-02-14 11:49:46 +0100 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2018-04-11 12:39:20 +0200 |
commit | 0b32e9018b8e1d5d99d3466babf33888d6ab1382 (patch) | |
tree | c8865d16a380a8a3f5cb7e73c660a49e7178407f | |
parent | c3e5a61a693800d5c9ef4190b3f8189eca31c99f (diff) | |
download | libsoup-0b32e9018b8e1d5d99d3466babf33888d6ab1382.tar.gz |
Don't enable the extra warnings for msvc
Suggested by https://bugzilla.gnome.org/show_bug.cgi?id=784212#c16
-rw-r--r-- | meson.build | 38 |
1 files 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 # ################### |