mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
Upgrade to C++20
This commit is contained in:
6
.github/build.sh
vendored
6
.github/build.sh
vendored
@@ -121,9 +121,9 @@ function inplace_sed() {
|
|||||||
|
|
||||||
if [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == windows-msvc ]]; then
|
if [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == windows-msvc ]]; then
|
||||||
case $BSH_HOST_ARCH in
|
case $BSH_HOST_ARCH in
|
||||||
x86_64) vs_env_arch=x64 ; cmake_vs_toolset=v141; vcvars_ver=14.1;;
|
x86_64) vs_env_arch=x64 ; vcvars_ver=14.29;;
|
||||||
x86) vs_env_arch=x86 ; cmake_vs_toolset=v141; vcvars_ver=14.1;;
|
x86) vs_env_arch=x86 ; vcvars_ver=14.29;;
|
||||||
aarch64) vs_env_arch=x64_arm64; cmake_vs_toolset=v143; vcvars_ver=14.29;;
|
aarch64) vs_env_arch=x64_arm64; vcvars_ver=14.29;;
|
||||||
esac
|
esac
|
||||||
VS_ENV_PARAMS=$vs_env_arch$'\t'-vcvars_ver=${BSH_VS_TOOLSET-$vcvars_ver}
|
VS_ENV_PARAMS=$vs_env_arch$'\t'-vcvars_ver=${BSH_VS_TOOLSET-$vcvars_ver}
|
||||||
. ./.github/vs-env.sh
|
. ./.github/vs-env.sh
|
||||||
|
20
meson.build
20
meson.build
@@ -1,19 +1,15 @@
|
|||||||
project(
|
project('the-powder-toy', 'cpp', version: 'the.cake.is.a.lie', meson_version: '>=0.64.0')
|
||||||
'the-powder-toy',
|
|
||||||
'cpp',
|
|
||||||
version: 'the.cake.is.a.lie',
|
|
||||||
default_options: [
|
|
||||||
'cpp_std=c++17',
|
|
||||||
'cpp_rtti=false',
|
|
||||||
],
|
|
||||||
meson_version: '>=0.64.0',
|
|
||||||
)
|
|
||||||
|
|
||||||
if get_option('prepare')
|
if get_option('prepare')
|
||||||
# we're being run by prepare.py in a ghactions workflow only to determine the values of options; exit early
|
# we're being run by prepare.py in a ghactions workflow only to determine the values of options; exit early
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
target_options = [
|
||||||
|
'cpp_std=c++20',
|
||||||
|
'cpp_rtti=false',
|
||||||
|
]
|
||||||
|
|
||||||
python = import('python')
|
python = import('python')
|
||||||
python3_prog = python.find_installation('python3')
|
python3_prog = python.find_installation('python3')
|
||||||
|
|
||||||
@@ -473,6 +469,7 @@ if get_option('build_powder')
|
|||||||
link_args: project_link_args,
|
link_args: project_link_args,
|
||||||
dependencies: powder_deps,
|
dependencies: powder_deps,
|
||||||
link_depends: copied_dlls,
|
link_depends: copied_dlls,
|
||||||
|
override_options: target_options,
|
||||||
)
|
)
|
||||||
subdir('android')
|
subdir('android')
|
||||||
else
|
else
|
||||||
@@ -487,6 +484,7 @@ if get_option('build_powder')
|
|||||||
export_dynamic: project_export_dynamic,
|
export_dynamic: project_export_dynamic,
|
||||||
install: true,
|
install: true,
|
||||||
link_depends: copied_dlls,
|
link_depends: copied_dlls,
|
||||||
|
override_options: target_options,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -515,6 +513,7 @@ if get_option('build_render')
|
|||||||
dependencies: render_deps,
|
dependencies: render_deps,
|
||||||
export_dynamic: project_export_dynamic,
|
export_dynamic: project_export_dynamic,
|
||||||
link_depends: copied_dlls,
|
link_depends: copied_dlls,
|
||||||
|
override_options: target_options,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -539,5 +538,6 @@ if get_option('build_font')
|
|||||||
dependencies: font_deps,
|
dependencies: font_deps,
|
||||||
export_dynamic: project_export_dynamic,
|
export_dynamic: project_export_dynamic,
|
||||||
link_depends: copied_dlls,
|
link_depends: copied_dlls,
|
||||||
|
override_options: target_options,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user