Add support for c++2a and gnu++2a

pull/4001/head
Zachary Michaels 6 years ago
parent 15fb284395
commit 8417c1a20f
  1. 8
      mesonbuild/compilers/cpp.py
  2. 4
      run_unittests.py

@ -80,8 +80,8 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
def get_options(self):
opts = CPPCompiler.get_options(self)
opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use',
['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z',
'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z'],
['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'],
'none')})
return opts
@ -139,8 +139,8 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
def get_options(self):
opts = CPPCompiler.get_options(self)
opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use',
['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z',
'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z'],
['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'],
'none'),
'cpp_debugstl': coredata.UserBooleanOption('cpp_debugstl',
'STL debug mode',

@ -3113,6 +3113,10 @@ class LinuxlikeTests(BasePlatformTests):
(version_compare(compiler.version, '<5.0.0') or
(compiler.clang_type == mesonbuild.compilers.CLANG_OSX and version_compare(compiler.version, '<9.2')))):
continue
if (compiler.get_id() == 'clang' and '2a' in v and
(version_compare(compiler.version, '<6.0.0') or
(compiler.clang_type == mesonbuild.compilers.CLANG_OSX and version_compare(compiler.version, '<9.2')))):
continue
std_opt = '{}={}'.format(lang_std, v)
self.init(testdir, ['-D' + std_opt])
cmd = self.get_compdb()[0]['command']

Loading…
Cancel
Save