nag: update the versioning scheme (#35457)
* nag: append build number to the version * nag: add version 7.1.7125 * nag: deprecate unavailable versions
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
import re
|
||||
from typing import List
|
||||
|
||||
import llnl.util.lang
|
||||
|
||||
import spack.compiler
|
||||
|
||||
|
||||
@@ -32,7 +35,13 @@ class Nag(spack.compiler.Compiler):
|
||||
}
|
||||
|
||||
version_argument = "-V"
|
||||
version_regex = r"NAG Fortran Compiler Release ([0-9.]+)"
|
||||
|
||||
@classmethod
|
||||
@llnl.util.lang.memoized
|
||||
def extract_version_from_output(cls, output):
|
||||
match = re.search(r"NAG Fortran Compiler Release (\d+).(\d+)\(.*\) Build (\d+)", output)
|
||||
if match:
|
||||
return ".".join(match.groups())
|
||||
|
||||
@property
|
||||
def verbose_flag(self):
|
||||
|
@@ -281,7 +281,7 @@ def test_oneapi_version_detection(version_str, expected_version):
|
||||
(
|
||||
"NAG Fortran Compiler Release 6.0(Hibiya) Build 1037\n"
|
||||
"Product NPL6A60NA for x86-64 Linux\n",
|
||||
"6.0",
|
||||
"6.0.1037",
|
||||
)
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user