aocc 3.1.0: fix version detection for v3.1.0 (#25084)
This commit is contained in:
parent
c7e8bdf9cf
commit
5698850dc4
2 changed files with 7 additions and 5 deletions
|
@ -98,15 +98,12 @@ def fc_pic_flag(self):
|
|||
@classmethod
|
||||
@llnl.util.lang.memoized
|
||||
def extract_version_from_output(cls, output):
|
||||
loc_ver = 'unknown'
|
||||
|
||||
match = re.search(
|
||||
r'AMD clang version ([^ )]+)',
|
||||
r'AOCC_(\d+)[._](\d+)[._](\d+)',
|
||||
output
|
||||
)
|
||||
if match:
|
||||
loc_ver = output.split('AOCC_')[1].split('-')[0]
|
||||
return loc_ver
|
||||
return '.'.join(match.groups())
|
||||
|
||||
@classmethod
|
||||
def fc_version(cls, fortran_compiler):
|
||||
|
|
|
@ -345,6 +345,11 @@ def _module(cmd, *args):
|
|||
|
||||
@pytest.mark.parametrize('version_str,expected_version', [
|
||||
# This applies to C,C++ and FORTRAN compiler
|
||||
('AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)'
|
||||
'(based on LLVM Mirror.Version.12.0.0)\n'
|
||||
'Target: x86_64-unknown-linux-gnu\n'
|
||||
'Thread model: posix\n', '3.1.0'
|
||||
),
|
||||
('AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#78 2020_12_10)'
|
||||
'(based on LLVM Mirror.Version.12.0.0)\n'
|
||||
'Target: x86_64-unknown-linux-gnu\n'
|
||||
|
|
Loading…
Reference in a new issue