summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/platforms/cray_xc.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py
index 0f6599ab30..24aa614e86 100644
--- a/lib/spack/spack/platforms/cray_xc.py
+++ b/lib/spack/spack/platforms/cray_xc.py
@@ -45,10 +45,10 @@ class CrayXc(Platform):
@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