diff options
author | Steven Noonan <steven@uplinklabs.net> | 2023-06-20 15:45:18 -0700 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2023-07-14 13:29:16 -0500 |
commit | 51d04776a3158ec8a50ea21fde2f19a8d6cdf4ee (patch) | |
tree | b1cb53de5310f6b868ea90db1a30e8e75ec7c3b5 /unittests | |
parent | 61984bcfa3e4e758d18174d13aa0aaedbf406889 (diff) | |
download | meson-51d04776a3158ec8a50ea21fde2f19a8d6cdf4ee.zip meson-51d04776a3158ec8a50ea21fde2f19a8d6cdf4ee.tar.gz meson-51d04776a3158ec8a50ea21fde2f19a8d6cdf4ee.tar.bz2 |
tests: add support for c++23/c++26 detection
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/linuxliketests.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index f322b02..7c4c6ca 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -517,6 +517,15 @@ class LinuxlikeTests(BasePlatformTests): has_cpp20 = (compiler.get_id() not in {'clang', 'gcc'} or compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=10.0.0', None) or compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=10.0.0')) + has_cpp2b = (compiler.get_id() not in {'clang', 'gcc'} or + compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=12.0.0', None) or + compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=12.2.0')) + has_cpp23 = (compiler.get_id() not in {'clang', 'gcc'} or + compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=17.0.0', None) or + compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=12.2.0')) + has_cpp26 = (compiler.get_id() not in {'clang', 'gcc'} or + compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=17.0.0', None) or + compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=14.0.0')) has_c18 = (compiler.get_id() not in {'clang', 'gcc'} or compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=8.0.0', '>=11.0') or compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=8.0.0')) @@ -533,6 +542,12 @@ class LinuxlikeTests(BasePlatformTests): continue elif '++20' in v and not has_cpp20: continue + elif '++2b' in v and not has_cpp2b: + continue + elif '++23' in v and not has_cpp23: + continue + elif ('++26' in v or '++2c' in v) and not has_cpp26: + continue # now C elif '17' in v and not has_cpp2a_c17: continue |