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:
Sergey Kosukhin
2023-07-20 21:03:26 +02:00
committed by GitHub
parent 3fbe5dd312
commit d2566e3d62
3 changed files with 27 additions and 7 deletions

View File

@@ -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):

View File

@@ -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",
)
],
)