diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2020-08-19 21:55:09 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-08-20 23:49:18 +0300 |
commit | 1f2150fe492e369f4d84644270b7fa86928a18b3 (patch) | |
tree | 9fcabf2fe7aabd7c9f0fb85a3569cf87fca31e53 /mesonbuild | |
parent | 86b47250c61bd373a3d28dd05a4a231564b1bfef (diff) | |
download | meson-1f2150fe492e369f4d84644270b7fa86928a18b3.zip meson-1f2150fe492e369f4d84644270b7fa86928a18b3.tar.gz meson-1f2150fe492e369f4d84644270b7fa86928a18b3.tar.bz2 |
Correctly determine C++ stds for Elbrus compiler
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/cpp.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index f5b0c05..f2a160b 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -365,9 +365,20 @@ class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler): **kwargs) ElbrusCompiler.__init__(self) - # It does not support c++/gnu++ 17 and 1z, but still does support 0x, 1y, and gnu++98. def get_options(self): opts = CPPCompiler.get_options(self) + + cpp_stds = [ + 'none', 'c++98', 'c++03', 'c++0x', 'c++11', 'c++14', 'c++1y', + 'gnu++98', 'gnu++03', 'gnu++0x', 'gnu++11', 'gnu++14', 'gnu++1y', + ] + + if version_compare(self.version, '>=1.24.00'): + cpp_stds += [ 'c++1z', 'c++17', 'gnu++1z', 'gnu++17' ] + + if version_compare(self.version, '>=1.25.00'): + cpp_stds += [ 'c++2a', 'gnu++2a' ] + opts.update({ 'eh': coredata.UserComboOption( 'C++ exception handling type.', @@ -376,10 +387,7 @@ class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler): ), 'std': coredata.UserComboOption( 'C++ language standard to use', - [ - 'none', 'c++98', 'c++03', 'c++0x', 'c++11', 'c++14', 'c++1y', - 'gnu++98', 'gnu++03', 'gnu++0x', 'gnu++11', 'gnu++14', 'gnu++1y', - ], + cpp_stds, 'none', ), 'debugstl': coredata.UserBooleanOption( |