2018-03-21 22:12:14 +01:00
|
|
|
--- a/mesonbuild/compilers/cpp.py
|
|
|
|
+++ b/mesonbuild/compilers/cpp.py
|
2018-08-04 23:27:12 +02:00
|
|
|
@@ -80,8 +80,8 @@ class ClangCPPCompiler(ClangCompiler, CP
|
|
|
|
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++1y', 'c++14', 'c++17', 'c++1z',
|
|
|
|
+ 'gnu++11', 'gnu++1y', 'gnu++14', 'gnu++17', 'gnu++1z'],
|
|
|
|
'none')})
|
|
|
|
return opts
|
|
|
|
|
|
|
|
@@ -111,8 +111,8 @@ class ArmclangCPPCompiler(ArmclangCompil
|
|
|
|
def get_options(self):
|
|
|
|
opts = CPPCompiler.get_options(self)
|
|
|
|
opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use',
|
2018-08-25 20:10:34 +02:00
|
|
|
- ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17',
|
2018-08-04 23:27:12 +02:00
|
|
|
- 'gnu++98', 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17'],
|
2018-08-25 20:10:34 +02:00
|
|
|
+ ['none', 'c++98', 'c++03', 'c++11', 'c++1y', 'c++14', 'c++17',
|
2018-08-04 23:27:12 +02:00
|
|
|
+ 'gnu++98', 'gnu++03', 'gnu++11', 'gnu++1y', 'gnu++14', 'gnu++17'],
|
|
|
|
'none')})
|
|
|
|
return opts
|
|
|
|
|
|
|
|
@@ -137,10 +137,12 @@ class GnuCPPCompiler(GnuCompiler, CPPCom
|
2017-03-17 14:58:10 +01:00
|
|
|
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
|
|
|
|
|
|
|
|
def get_options(self):
|
2018-08-04 23:27:12 +02:00
|
|
|
+ cpp_stds = ['c++98', 'c++03', 'c++11', 'c++1y', 'gnu++11', 'gnu++1y']
|
2017-09-08 14:27:05 +02:00
|
|
|
+ if version_compare(self.version, '>=5.0.0'):
|
2018-03-22 00:03:57 +01:00
|
|
|
+ cpp_stds += ['c++14', 'c++17', 'c++1z', 'gnu++14', 'gnu++17', 'gnu++1z']
|
2018-08-04 23:27:12 +02:00
|
|
|
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'] + cpp_stds,
|
|
|
|
'none'),
|
|
|
|
'cpp_debugstl': coredata.UserBooleanOption('cpp_debugstl',
|
|
|
|
'STL debug mode',
|
|
|
|
@@ -211,7 +213,7 @@ class IntelCPPCompiler(IntelCompiler, CP
|
|
|
|
c_stds = []
|
|
|
|
g_stds = ['gnu++98']
|
|
|
|
if version_compare(self.version, '>=15.0.0'):
|
|
|
|
- c_stds += ['c++11', 'c++14']
|
|
|
|
+ c_stds += ['c++11', 'c++1y', 'c++14']
|
|
|
|
g_stds += ['gnu++11']
|
|
|
|
if version_compare(self.version, '>=16.0.0'):
|
|
|
|
c_stds += ['c++17']
|
2018-03-21 22:12:14 +01:00
|
|
|
--- a/mesonbuild/minit.py
|
|
|
|
+++ b/mesonbuild/minit.py
|
2018-04-26 10:56:00 +02:00
|
|
|
@@ -149,7 +149,7 @@ int main(int argc, char **argv) {{
|
2018-03-22 01:26:26 +01:00
|
|
|
hello_cpp_meson_template = '''project('{project_name}', 'cpp',
|
|
|
|
version : '{version}',
|
2018-04-26 10:56:00 +02:00
|
|
|
default_options : ['warning_level=3',
|
|
|
|
- 'cpp_std=c++14'])
|
2018-03-21 23:53:28 +01:00
|
|
|
+ 'cpp_std=c++1y'])
|
2017-08-15 18:57:45 +02:00
|
|
|
|
2018-03-21 22:12:14 +01:00
|
|
|
exe = executable('{exe_name}', '{source_name}',
|
|
|
|
install : true)
|
2018-04-26 10:56:00 +02:00
|
|
|
@@ -220,7 +220,7 @@ int main(int argc, char **argv) {{
|
2018-03-21 22:12:14 +01:00
|
|
|
|
|
|
|
lib_cpp_meson_template = '''project('{project_name}', 'cpp',
|
|
|
|
version : '{version}',
|
|
|
|
- default_options : ['warning_level=3', 'cpp_std=c++14'])
|
2018-03-21 23:53:28 +01:00
|
|
|
+ default_options : ['warning_level=3', 'cpp_std=c++1y'])
|
2018-03-21 22:12:14 +01:00
|
|
|
|
|
|
|
# These arguments are only used to build the shared library
|
|
|
|
# not the executables that use the library.
|
2018-04-26 11:21:13 +02:00
|
|
|
@@ -416,7 +416,7 @@ def create_meson_build(options):
|
|
|
|
default_options = ['warning_level=3']
|
|
|
|
if options.language == 'cpp':
|
|
|
|
# This shows how to set this very common option.
|
|
|
|
- default_options += ['cpp_std=c++14']
|
|
|
|
+ default_options += ['cpp_std=c++1y']
|
|
|
|
# If we get a meson.build autoformatter one day, this code could
|
|
|
|
# be simplified quite a bit.
|
|
|
|
formatted_default_options = ', '.join("'{}'".format(x) for x in default_options)
|
2018-03-21 22:12:14 +01:00
|
|
|
--- "a/test cases/unit/16 prebuilt shared/patron.c"
|
|
|
|
+++ "b/test cases/unit/16 prebuilt shared/patron.c"
|
|
|
|
@@ -5,4 +5,5 @@ int main(int argc, char **argv) {
|
|
|
|
printf("You are standing outside the Great Library of Alexandria.\n");
|
|
|
|
printf("You decide to go inside.\n\n");
|
|
|
|
alexandria_visit();
|
|
|
|
+ return 0;
|
|
|
|
}
|