Compiler detection: avoid false recognition of MSVC (#34574)
Interim fix for #34559 Spack's MSVC compiler definition uses ifx as the Fortran compiler. Prior to #33385, the Spack MSVC compiler definition required the executable to be called "ifx.exe"; #33385 replaced this with just "ifx", which inadvertently led to ifx falsely indicating the presence of MSVC on non-Windows systems (which leads to future errors when attempting to query/use those compiler objects). This commit applies a short-term fix by updating MSVC Fortran version detection to always indicate a failure on non-Windows.
This commit is contained in:
		| @@ -160,6 +160,8 @@ def setup_custom_environment(self, pkg, env): | ||||
|     def fc_version(cls, fc): | ||||
|         # We're using intel for the Fortran compilers, which exist if | ||||
|         # ONEAPI_ROOT is a meaningful variable | ||||
|         if not sys.platform == "win32": | ||||
|             return "unknown" | ||||
|         fc_ver = cls.default_version(fc) | ||||
|         avail_fc_version.add(fc_ver) | ||||
|         fc_path[fc_ver] = fc | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 John W. Parent
					John W. Parent