source: waflib/Tools/ifort.py @ f36ecea

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since f36ecea was 0fa325b, checked in by Paul Brossier <piem@piem.org>, 11 years ago

waf: unpack

  • 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        fc=conf.cmd_to_list(fc)
13        conf.get_ifort_version(fc)
14        conf.env.FC_NAME='IFORT'
15@conf
16def ifort_modifier_cygwin(conf):
17        raise NotImplementedError("Ifort on cygwin not yet implemented")
18@conf
19def ifort_modifier_win32(conf):
20        fc_config.fortran_modifier_win32(conf)
21@conf
22def ifort_modifier_darwin(conf):
23        fc_config.fortran_modifier_darwin(conf)
24@conf
25def ifort_modifier_platform(conf):
26        dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
27        ifort_modifier_func=getattr(conf,'ifort_modifier_'+dest_os,None)
28        if ifort_modifier_func:
29                ifort_modifier_func()
30@conf
31def get_ifort_version(conf,fc):
32        version_re=re.compile(r"ifort\s*\(IFORT\)\s*(?P<major>\d*)\.(?P<minor>\d*)",re.I).search
33        cmd=fc+['--version']
34        out,err=fc_config.getoutput(conf,cmd,stdin=False)
35        if out:
36                match=version_re(out)
37        else:
38                match=version_re(err)
39        if not match:
40                conf.fatal('cannot determine ifort version.')
41        k=match.groupdict()
42        conf.env['FC_VERSION']=(k['major'],k['minor'])
43def configure(conf):
44        conf.find_ifort()
45        conf.find_program('xiar',var='AR')
46        conf.env.ARFLAGS='rcs'
47        conf.fc_flags()
48        conf.fc_add_flags()
49        conf.ifort_modifier_platform()
Note: See TracBrowser for help on using the repository browser.