[libsoup/wip/meson: 88/93] Don't enable the extra warnings for msvc



commit 0b32e9018b8e1d5d99d3466babf33888d6ab1382
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Feb 14 11:49:46 2018 +0100

    Don't enable the extra warnings for msvc
    
    Suggested by https://bugzilla.gnome.org/show_bug.cgi?id=784212#c16

 meson.build |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/meson.build b/meson.build
index 824bc30..b920a38 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 #
 ###################


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]