aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
authorFlorian Schmaus <flo@geekplace.eu>2020-12-09 17:12:16 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2020-12-10 00:30:48 +0200
commita7aba905a0e53ebdbaeccb3890291e5c147bd845 (patch)
treeba68c931d4f937f38a11d5e621878d477d263792 /mesonbuild/compilers/cpp.py
parentafb5184ec900ece9dc078b6b822233fa80576efd (diff)
downloadmeson-a7aba905a0e53ebdbaeccb3890291e5c147bd845.zip
meson-a7aba905a0e53ebdbaeccb3890291e5c147bd845.tar.gz
meson-a7aba905a0e53ebdbaeccb3890291e5c147bd845.tar.bz2
compilers: add support for c++20/gnu++20
Fixes #8084.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r--mesonbuild/compilers/cpp.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 6ba87eb..607bea7 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -150,7 +150,9 @@ class CPPCompiler(CLikeCompiler, Compiler):
'c++14': 'c++1y',
'gnu++14': 'gnu++1y',
'c++17': 'c++1z',
- 'gnu++17': 'gnu++1z'
+ 'gnu++17': 'gnu++1z',
+ 'c++20': 'c++2a',
+ 'gnu++20': 'gnu++2a',
}
# Currently, remapping is only supported for Clang, Elbrus and GCC
@@ -206,7 +208,8 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
})
opts['std'].choices = [ # type: ignore
'none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z',
- 'c++2a', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a',
+ 'c++2a', 'c++20', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z',
+ 'gnu++2a', 'gnu++20',
]
if self.info.is_windows() or self.info.is_cygwin():
opts.update({
@@ -344,8 +347,8 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
})
opts['std'].choices = [ # type: ignore
'none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z',
- 'c++2a', 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z',
- 'gnu++2a',
+ 'c++2a', 'c++20', 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17',
+ 'gnu++1z', 'gnu++2a', 'gnu++20',
]
if self.info.is_windows() or self.info.is_cygwin():
opts.update({