fc_xlf.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def get_xlf_version(conf, fc):
    """Get the compiler version"""

    cmd = fc + ['-qversion']
    try:
        out, err = conf.cmd_and_log(cmd, output=0)
    except Errors.WafError:
        conf.fatal('Could not find xlf %r' % cmd)

    for v in (r"IBM XL Fortran.* V(?P<major>\d*)\.(?P<minor>\d*)",):
        version_re = re.compile(v, re.I).search
        match = version_re(out or err)
        if match:
            k = match.groupdict()
            conf.env['FC_VERSION'] = (k['major'], k['minor'])
            break
    else:
        conf.fatal('Could not determine the XLF version.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号