Merge pull request #1245 from LLNL/features/cray-detection-improvement
The /cray_home directory is more consistent than the /cray/craype dir…
This commit is contained in:
		| @@ -2,6 +2,7 @@ | ||||
| from spack.architecture import Platform, Target | ||||
| from spack.operating_systems.linux_distro import LinuxDistro | ||||
| from spack.operating_systems.cnl import Cnl | ||||
| from spack.util.executable import which | ||||
|  | ||||
| class CrayXc(Platform): | ||||
|     priority    = 20 | ||||
| @@ -42,5 +43,11 @@ def __init__(self): | ||||
|  | ||||
|     @classmethod | ||||
|     def detect(self): | ||||
|         return os.path.exists('/opt/cray/craype') | ||||
|         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() | ||||
|             if '-D__CRAYXC' in text: | ||||
|                 return True | ||||
|         return False | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Todd Gamblin
					Todd Gamblin