2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 18:07:12 +01:00

Issue 1078

This commit is contained in:
Thomas Nagy 2011-12-07 20:50:20 +01:00
parent 818b605675
commit a639280339

View File

@ -35,11 +35,11 @@ def find_pgi_compiler(conf, var, name):
def get_pgi_version(conf, cc): def get_pgi_version(conf, cc):
"""Find the version of a pgi compiler.""" """Find the version of a pgi compiler."""
version_re = re.compile(r"The Portland Group", re.I).search version_re = re.compile(r"The Portland Group", re.I).search
cmd = cc + ['-V'] cmd = cc + ['-V', '-E'] # Issue 1078, prevent wrappers from linking
try: try:
out, err = conf.cmd_and_log(cmd, output=0) out, err = conf.cmd_and_log(cmd, output=0)
except: except Exception:
conf.fatal('Could not find pgi compiler %r' % cmd) conf.fatal('Could not find pgi compiler %r' % cmd)
if out: match = version_re(out) if out: match = version_re(out)
@ -51,7 +51,7 @@ def get_pgi_version(conf, cc):
cmd = cc + ['-help=variable'] cmd = cc + ['-help=variable']
try: try:
out, err = conf.cmd_and_log(cmd, output=0) out, err = conf.cmd_and_log(cmd, output=0)
except: except Exception:
conf.fatal('Could not find pgi compiler %r' % cmd) conf.fatal('Could not find pgi compiler %r' % cmd)
version = re.findall('^COMPVER\s*=(.*)', out, re.M) version = re.findall('^COMPVER\s*=(.*)', out, re.M)