diff options
author | Gregory Becker <becker33.llnl.gov> | 2016-07-20 10:25:07 -0700 |
---|---|---|
committer | Gregory Becker <becker33.llnl.gov> | 2016-07-20 10:25:07 -0700 |
commit | 4c506b36c5e6762ce08b616fa32a6064f7766ad3 (patch) | |
tree | 4074d9d0d3bcc50cd79183f6f4fcd35ab0a49bee | |
parent | 17a63c964646d3be122c9bda0813dbcced0a23a0 (diff) | |
download | spack-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.py | 10 |
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 |