aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Builtin-options.md2
-rw-r--r--docs/markdown/Configuring-a-build-directory.md2
-rw-r--r--mesonbuild/compilers/cpp.py11
3 files changed, 9 insertions, 6 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md
index b2e1c3c..8fe9fbe 100644
--- a/docs/markdown/Builtin-options.md
+++ b/docs/markdown/Builtin-options.md
@@ -172,7 +172,7 @@ compiler being used:
| c_thread_count | 4 | integer value ≥ 0 | Number of threads to use with emcc when using threads |
| cpp_args | | free-form comma-separated list | C++ compile arguments to use |
| cpp_link_args | | free-form comma-separated list | C++ link arguments to use |
-| cpp_std | none | none, c++98, c++03, c++11, c++14, c++17, c++2a <br/>c++1z, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, gnu++2a, <br/> vc++14, vc++17, vc++latest | C++ language standard to use |
+| cpp_std | none | none, c++98, c++03, c++11, c++14, c++17, c++20 <br/>c++2a, c++1z, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, <br/> gnu++2a, gnu++20, vc++14, vc++17, vc++latest | C++ language standard to use |
| cpp_debugstl | false | true, false | C++ STL debug mode |
| cpp_eh | default | none, default, a, s, sc | C++ exception handling type |
| cpp_rtti | true | true, false | Whether to enable RTTI (runtime type identification) |
diff --git a/docs/markdown/Configuring-a-build-directory.md b/docs/markdown/Configuring-a-build-directory.md
index 6081c35..199d1d7 100644
--- a/docs/markdown/Configuring-a-build-directory.md
+++ b/docs/markdown/Configuring-a-build-directory.md
@@ -64,7 +64,7 @@ sample output for a simple project.
cpp_args [] Extra arguments passed to the C++ compiler
cpp_debugstl false [true, false] STL debug mode
cpp_link_args [] Extra arguments passed to the C++ linker
- cpp_std c++11 [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++ language standard to use
+ cpp_std c++11 [none, c++98, c++03, c++11, c++14, c++17, c++1z, c++2a, c++20, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, gnu++2a, gnu++20] C++ language standard to use
fortran_std [] [none, legacy, f95, f2003, f2008, f2018] language standard to use
Directories:
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({