Issue 1078

This commit is contained in:
Thomas Nagy 2011-12-07 20:50:20 +01:00
parent 818b605675
commit a639280339
1 changed files with 3 additions and 3 deletions

View File

@ -35,11 +35,11 @@ def find_pgi_compiler(conf, var, name):
def get_pgi_version(conf, cc):
"""Find the version of a pgi compiler."""
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:
out, err = conf.cmd_and_log(cmd, output=0)
except:
except Exception:
conf.fatal('Could not find pgi compiler %r' % cmd)
if out: match = version_re(out)
@ -51,7 +51,7 @@ def get_pgi_version(conf, cc):
cmd = cc + ['-help=variable']
try:
out, err = conf.cmd_and_log(cmd, output=0)
except:
except Exception:
conf.fatal('Could not find pgi compiler %r' % cmd)
version = re.findall('^COMPVER\s*=(.*)', out, re.M)