msvc: do not detect unless ends with .exe

Signed-off-by: Gregory Becker <becker33@llnl.gov>
This commit is contained in:
Gregory Becker 2025-03-27 14:44:59 -07:00 committed by Harmen Stoppels
parent b932c14008
commit b7f27d799a

View File

@ -59,6 +59,10 @@ def install(self, spec, prefix):
@classmethod @classmethod
def determine_version(cls, exe): def determine_version(cls, exe):
if not exe.name.endswith(".exe"):
# Not on windows, can't possibly be msvc
return
# MSVC compiler does not have a proper version argument # MSVC compiler does not have a proper version argument
# Errors out and prints version info with no args # Errors out and prints version info with no args
is_ifx = "ifx.exe" in str(exe) is_ifx = "ifx.exe" in str(exe)