This commit is contained in:
parent
6e97a6edde
commit
535492b86c
@ -1,14 +1,12 @@
|
||||
--- a/mesonbuild/compilers/cpp.py
|
||||
+++ b/mesonbuild/compilers/cpp.py
|
||||
@@ -102,9 +102,13 @@ class GnuCPPCompiler(GnuCompiler, CPPCom
|
||||
@@ -102,9 +102,11 @@ class GnuCPPCompiler(GnuCompiler, CPPCom
|
||||
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
|
||||
|
||||
def get_options(self):
|
||||
+ cpp_stds = ['c++98', 'c++03', 'c++11', 'gnu++03', 'gnu++11']
|
||||
+ cpp_stds = ['c++98', 'c++03', 'c++11', 'c++1y', 'gnu++03', 'gnu++11', 'gnu++1y']
|
||||
+ if version_compare(self.version, '>=5.0.0'):
|
||||
+ cpp_stds += ['c++14', 'c++17', 'c++1z', 'gnu++14', 'gnu++17', 'gnu++1z']
|
||||
+ else:
|
||||
+ cpp_stds += ['c++1y', 'gnu++1y']
|
||||
opts = {'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'],
|
||||
@ -18,11 +16,22 @@
|
||||
'STL debug mode',
|
||||
--- a/mesonbuild/minit.py
|
||||
+++ b/mesonbuild/minit.py
|
||||
@@ -124,7 +124,7 @@ int main(int argc, char **argv) {{
|
||||
@@ -123,8 +123,7 @@ int main(int argc, char **argv) {{
|
||||
|
||||
hello_c_meson_template = '''project('{project_name}', 'c',
|
||||
version : '{version}',
|
||||
default_options : ['warning_level=3',
|
||||
- default_options : ['warning_level=3',
|
||||
- 'cpp_std=c++14'])
|
||||
+ default_options : ['warning_level=3'])
|
||||
|
||||
exe = executable('{exe_name}', '{source_name}',
|
||||
install : true)
|
||||
@@ -148,7 +147,8 @@ int main(int argc, char **argv) {{
|
||||
|
||||
hello_cpp_meson_template = '''project('{project_name}', 'cpp',
|
||||
version : '{version}',
|
||||
- default_options : ['warning_level=3'])
|
||||
+ default_options : ['warning_level=3',
|
||||
+ 'cpp_std=c++1y'])
|
||||
|
||||
exe = executable('{exe_name}', '{source_name}',
|
||||
|
Loading…
Reference in New Issue
Block a user