Improved cray_xc detection

This commit is contained in:
Gregory Becker 2016-07-20 10:25:07 -07:00
parent 17a63c9646
commit 4c506b36c5

View file

@ -45,10 +45,10 @@ def __init__(self):
@classmethod
def detect(self):
if os.path.exists('/cray_home'):
cc_verbose = which('cc')
cc_verbose.add_default_arg('-craype-verbose')
text = cc_verbose(output=str, error=str, ignore_errors=True).split()
try:
cc_verbose = which('ftn')
text = cc_verbose('-craype-verbose', output=str, error=str, ignore_errors=True).split()
if '-D__CRAYXC' in text:
return True
return False
finally:
return False