From 8d9cf6fc006c32b8e4ed046f2f107bc8fcc2af23 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 7 Jan 2025 13:07:22 -0800 Subject: [PATCH] templates: update C and C++ standards to more recent versions --- mesonbuild/templates/cpptemplates.py | 4 ++-- mesonbuild/templates/ctemplates.py | 4 ++-- mesonbuild/templates/cudatemplates.py | 4 ++-- mesonbuild/templates/objctemplates.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mesonbuild/templates/cpptemplates.py b/mesonbuild/templates/cpptemplates.py index 91dd09242475..383aec1c8b46 100644 --- a/mesonbuild/templates/cpptemplates.py +++ b/mesonbuild/templates/cpptemplates.py @@ -29,7 +29,7 @@ 'cpp', version : '{version}', meson_version : '>= {meson_version}', - default_options : ['warning_level=3', 'cpp_std=c++14'], + default_options : ['warning_level=3', 'cpp_std=c++20'], ) dependencies = [{dependencies} @@ -111,7 +111,7 @@ class {utoken}_PUBLIC {class_name} {{ 'cpp', version : '{version}', meson_version : '>= {meson_version}', - default_options : ['warning_level=3', 'cpp_std=c++14'], + default_options : ['warning_level=3', 'cpp_std=c++20'], ) dependencies = [{dependencies} diff --git a/mesonbuild/templates/ctemplates.py b/mesonbuild/templates/ctemplates.py index 02502172d272..a718b31f613d 100644 --- a/mesonbuild/templates/ctemplates.py +++ b/mesonbuild/templates/ctemplates.py @@ -61,7 +61,7 @@ 'c', version : '{version}', meson_version : '>= {meson_version}', - default_options : ['warning_level=3'], + default_options : ['warning_level=3', 'c_std=c17'], ) # These arguments are only used to build the shared library @@ -127,7 +127,7 @@ 'c', meson_version : '>= {meson_version}', version : '{version}', - default_options : ['warning_level=3'], + default_options : ['warning_level=3', 'c_std=c17'], ) dependencies = [{dependencies} diff --git a/mesonbuild/templates/cudatemplates.py b/mesonbuild/templates/cudatemplates.py index 80f93640d86d..5b5753d47df5 100644 --- a/mesonbuild/templates/cudatemplates.py +++ b/mesonbuild/templates/cudatemplates.py @@ -30,7 +30,7 @@ ['cuda', 'cpp'], version : '{version}', meson_version : '>= {meson_version}', - default_options : ['warning_level=3', 'cpp_std=c++14'], + default_options : ['warning_level=3', 'cpp_std=c++20'], ) dependencies = [{dependencies} @@ -112,7 +112,7 @@ class {utoken}_PUBLIC {class_name} {{ ['cuda', 'cpp'], version : '{version}', meson_version : '>= {meson_version}', - default_options : ['warning_level=3'], + default_options : ['warning_level=3', 'cpp_std=c++20'], ) # These arguments are only used to build the shared library diff --git a/mesonbuild/templates/objctemplates.py b/mesonbuild/templates/objctemplates.py index 3de9cff35ddd..d678f6ffbd16 100644 --- a/mesonbuild/templates/objctemplates.py +++ b/mesonbuild/templates/objctemplates.py @@ -61,7 +61,7 @@ 'objc', version : '{version}', meson_version : '>= {meson_version}', - default_options : ['warning_level=3'], + default_options : ['warning_level=3', 'c_std=c17'], ) dependencies = [{dependencies} @@ -126,7 +126,7 @@ 'objc', version : '{version}', meson_version : '>= {meson_version}', - default_options : ['warning_level=3'], + default_options : ['warning_level=3', 'c_std=c17'], ) dependencies = [{dependencies}