From b46f35c1e5260f93949044650787bb68eb69ea46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Thu, 7 Nov 2024 11:47:27 +0100 Subject: [PATCH] Upgrade to C++20 --- .github/build.sh | 6 +++--- meson.build | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/build.sh b/.github/build.sh index 0e7ecdbd9..dbfef9d2c 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -121,9 +121,9 @@ function inplace_sed() { if [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == windows-msvc ]]; then case $BSH_HOST_ARCH in - x86_64) vs_env_arch=x64 ; cmake_vs_toolset=v141; vcvars_ver=14.1;; - x86) vs_env_arch=x86 ; cmake_vs_toolset=v141; vcvars_ver=14.1;; - aarch64) vs_env_arch=x64_arm64; cmake_vs_toolset=v143; vcvars_ver=14.29;; + x86_64) vs_env_arch=x64 ; vcvars_ver=14.29;; + x86) vs_env_arch=x86 ; vcvars_ver=14.29;; + aarch64) vs_env_arch=x64_arm64; vcvars_ver=14.29;; esac VS_ENV_PARAMS=$vs_env_arch$'\t'-vcvars_ver=${BSH_VS_TOOLSET-$vcvars_ver} . ./.github/vs-env.sh diff --git a/meson.build b/meson.build index 9da4f783f..38b48a676 100644 --- a/meson.build +++ b/meson.build @@ -1,19 +1,15 @@ -project( - 'the-powder-toy', - 'cpp', - version: 'the.cake.is.a.lie', - default_options: [ - 'cpp_std=c++17', - 'cpp_rtti=false', - ], - meson_version: '>=0.64.0', -) +project('the-powder-toy', 'cpp', version: 'the.cake.is.a.lie', meson_version: '>=0.64.0') if get_option('prepare') # we're being run by prepare.py in a ghactions workflow only to determine the values of options; exit early subdir_done() endif +target_options = [ + 'cpp_std=c++20', + 'cpp_rtti=false', +] + python = import('python') python3_prog = python.find_installation('python3') @@ -473,6 +469,7 @@ if get_option('build_powder') link_args: project_link_args, dependencies: powder_deps, link_depends: copied_dlls, + override_options: target_options, ) subdir('android') else @@ -487,6 +484,7 @@ if get_option('build_powder') export_dynamic: project_export_dynamic, install: true, link_depends: copied_dlls, + override_options: target_options, ) endif endif @@ -515,6 +513,7 @@ if get_option('build_render') dependencies: render_deps, export_dynamic: project_export_dynamic, link_depends: copied_dlls, + override_options: target_options, ) endif @@ -539,5 +538,6 @@ if get_option('build_font') dependencies: font_deps, export_dynamic: project_export_dynamic, link_depends: copied_dlls, + override_options: target_options, ) endif