wscript: use ctx.env.CC_NAME to check if using msvc
authorPaul Brossier <piem@piem.org>
Mon, 2 May 2016 23:22:33 +0000 (01:22 +0200)
committerPaul Brossier <piem@piem.org>
Mon, 2 May 2016 23:22:33 +0000 (01:22 +0200)
wscript

diff --git a/wscript b/wscript
index f4eb8fe..db17caa 100644 (file)
--- a/wscript
+++ b/wscript
@@ -116,7 +116,7 @@ def configure(ctx):
         target_platform = ctx.options.target_platform
     ctx.env['DEST_OS'] = target_platform
 
-    if 'CL.exe' not in ctx.env.CC[0]:
+    if ctx.env.CC_NAME != 'msvc':
         ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra']
     else:
         ctx.env.CFLAGS += ['/W4']