summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Becker <becker33.llnl.gov>2016-07-20 10:25:07 -0700
committerGregory Becker <becker33.llnl.gov>2016-07-20 10:25:07 -0700
commit4c506b36c5e6762ce08b616fa32a6064f7766ad3 (patch)
tree4074d9d0d3bcc50cd79183f6f4fcd35ab0a49bee
parent17a63c964646d3be122c9bda0813dbcced0a23a0 (diff)
downloadspack-4c506b36c5e6762ce08b616fa32a6064f7766ad3.tar.gz
spack-4c506b36c5e6762ce08b616fa32a6064f7766ad3.tar.bz2
spack-4c506b36c5e6762ce08b616fa32a6064f7766ad3.tar.xz
spack-4c506b36c5e6762ce08b616fa32a6064f7766ad3.zip
Improved cray_xc detection
-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