source: waflib/Tools/ifort.py @ 6d7acc8

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 6d7acc8 was 904702d, checked in by Paul Brossier <piem@piem.org>, 10 years ago

waf, waflib: update to 1.8.7

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#! /usr/bin/env python
2# encoding: utf-8
3# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
5import re
6from waflib import Utils
7from waflib.Tools import fc,fc_config,fc_scan,ar
8from waflib.Configure import conf
9@conf
10def find_ifort(conf):
11        fc=conf.find_program('ifort',var='FC')
12        conf.get_ifort_version(fc)
13        conf.env.FC_NAME='IFORT'
14@conf
15def ifort_modifier_cygwin(conf):
16        raise NotImplementedError("Ifort on cygwin not yet implemented")
17@conf
18def ifort_modifier_win32(conf):
19        fc_config.fortran_modifier_win32(conf)
20@conf
21def ifort_modifier_darwin(conf):
22        fc_config.fortran_modifier_darwin(conf)
23@conf
24def ifort_modifier_platform(conf):
25        dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
26        ifort_modifier_func=getattr(conf,'ifort_modifier_'+dest_os,None)
27        if ifort_modifier_func:
28                ifort_modifier_func()
29@conf
30def get_ifort_version(conf,fc):
31        version_re=re.compile(r"Intel[\sa-zA-Z()0-9,-]*Version\s*(?P<major>\d*)\.(?P<minor>\d*)",re.I).search
32        if Utils.is_win32:
33                cmd=fc
34        else:
35                cmd=fc+['-logo']
36        out,err=fc_config.getoutput(conf,cmd,stdin=False)
37        if out:
38                match=version_re(out)
39        else:
40                match=version_re(err)
41        if not match:
42                conf.fatal('cannot determine ifort version.')
43        k=match.groupdict()
44        conf.env['FC_VERSION']=(k['major'],k['minor'])
45def configure(conf):
46        conf.find_ifort()
47        conf.find_program('xiar',var='AR')
48        conf.env.ARFLAGS='rcs'
49        conf.fc_flags()
50        conf.fc_add_flags()
51        conf.ifort_modifier_platform()
Note: See TracBrowser for help on using the repository browser.