wscript: do not pass -Wextra to msvc
authorPaul Brossier <piem@piem.org>
Mon, 30 Dec 2013 23:43:25 +0000 (19:43 -0400)
committerPaul Brossier <piem@piem.org>
Mon, 30 Dec 2013 23:43:25 +0000 (19:43 -0400)
wscript

diff --git a/wscript b/wscript
index c2a074d..1f54a43 100644 (file)
--- a/wscript
+++ b/wscript
@@ -85,13 +85,16 @@ def configure(ctx):
     ctx.load('waf_unit_test')
     ctx.load('gnu_dirs')
 
-    ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra']
-
     target_platform = Options.platform
     if ctx.options.target_platform:
         target_platform = ctx.options.target_platform
     ctx.env['DEST_OS'] = target_platform
 
+    if 'CL.exe' not in ctx.env.CC[0]:
+        ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra']
+    else:
+        ctx.env.CFLAGS += ['-Wall']
+
     if target_platform not in ['win32', 'win64']:
         ctx.env.CFLAGS += ['-fPIC']
     else: