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 @classmethod
def detect(self): def detect(self):
if os.path.exists('/cray_home'): try:
cc_verbose = which('cc') cc_verbose = which('ftn')
cc_verbose.add_default_arg('-craype-verbose') text = cc_verbose('-craype-verbose', output=str, error=str, ignore_errors=True).split()
text = cc_verbose(output=str, error=str, ignore_errors=True).split()
if '-D__CRAYXC' in text: if '-D__CRAYXC' in text:
return True return True
finally:
return False return False