Improved cray_xc detection
This commit is contained in:
parent
17a63c9646
commit
4c506b36c5
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue