src/wscript_build: only no -lm if compiler is CL.exe
authorPaul Brossier <piem@piem.org>
Fri, 22 Apr 2016 22:34:13 +0000 (00:34 +0200)
committerPaul Brossier <piem@piem.org>
Fri, 22 Apr 2016 22:34:13 +0000 (00:34 +0200)
src/wscript_build
tests/wscript_build

index d424904..bd5fa26 100644 (file)
@@ -12,7 +12,7 @@ uselib += ['BLAS']
 
 # build each source files
 source = ctx.path.ant_glob('*.c **/*.c')
 
 # build each source files
 source = ctx.path.ant_glob('*.c **/*.c')
-lib = 'm' if ctx.env['DEST_OS'] not in ['win32', 'win64'] else None
+lib = 'm' if 'CL.exe' not in ctx.env.CC[0] else None
 ctx(features = 'c',
         source = source,
         includes = ['.'],
 ctx(features = 'c',
         source = source,
         includes = ['.'],
index 379c5cf..28ed3e3 100644 (file)
@@ -1,6 +1,6 @@
 # vim:set syntax=python:
 
 # vim:set syntax=python:
 
-lib = 'm' if ctx.env['DEST_OS'] not in ['win32', 'win64'] else None
+lib = 'm' if 'CL.exe' not in ctx.env.CC[0] else None
 
 uselib = []
 uselib += ['FFTW3', 'FFTW3F']
 
 uselib = []
 uselib += ['FFTW3', 'FFTW3F']