From b56d65fce5f4743a23399f0cde006bed1b52d53d Mon Sep 17 00:00:00 2001 From: Gregory Lee Date: Fri, 26 Feb 2021 14:57:40 -0800 Subject: Compilers: make oneapi ifx version_regex tolerant to wrappers (#21742) If a user creates a wrapper for the ifx binary called ifx_orig, this causes the ifx --version command to produce: $ ifx --version ifx_orig (IFORT) 2021.1 Beta 20201113 Copyright (C) 1985-2020 Intel Corporation. All rights reserved. The regex for ifx currently expects the output to begin with "ifx (IFORT)..." so the wrapper would not be detected as ifx. This PR removes the need for the static "ifx" string which allows wrappers to be detected as ifx. In general, the Intel compiler regexes do not include the invoked executable name (i.e., ifort, icc, icx, etc.), so this is not expected to cause any issues. --- lib/spack/spack/compilers/oneapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/spack/spack/compilers/oneapi.py b/lib/spack/spack/compilers/oneapi.py index 5b3a81b454..0289d266b8 100644 --- a/lib/spack/spack/compilers/oneapi.py +++ b/lib/spack/spack/compilers/oneapi.py @@ -29,7 +29,7 @@ class Oneapi(Compiler): PrgEnv_compiler = 'oneapi' version_argument = '--version' - version_regex = r'(?:(?:oneAPI DPC\+\+ Compiler)|(?:ifx \(IFORT\))) (\S+)' + version_regex = r'(?:(?:oneAPI DPC\+\+ Compiler)|(?:\(IFORT\))) (\S+)' @property def verbose_flag(self): -- cgit v1.2.3-60-g2f50