dozen: require c++20 for designated initializers

We do require C++20 still, because designated initializers is part of
that standard. This is almost a revert, but conditionally selecting
between c++latest or c++20 when available, as that's what we really want.

Fixes: 55ca1c8db3 ("vulkan/microsoft: Remove `override_options: ['cpp_std=c++latest']` option for visual studio")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>
This commit is contained in:
Erik Faye-Lund
2022-04-01 09:07:40 +02:00
committed by Marge Bot
parent ed399a179e
commit f607db2689
+10 -1
View File
@@ -64,6 +64,14 @@ if with_platform_windows
dzn_flags += '-DVK_USE_PLATFORM_WIN32_KHR'
endif
if meson.version().version_compare('>= 0.60')
cpp_std = 'cpp_std=c++20'
elif cpp.get_id() == 'msvc'
cpp_std = 'cpp_std=c++latest'
else
cpp_std = 'cpp_std=c++2a'
endif
libvulkan_dzn = shared_library(
'vulkan_dzn',
[libdzn_files, dzn_entrypoints, sha1_h],
@@ -78,7 +86,8 @@ libvulkan_dzn = shared_library(
gnu_symbol_visibility : 'hidden',
link_args : [ld_args_bsymbolic, ld_args_gc_sections],
name_prefix : host_machine.system() == 'windows' ? '' : 'lib',
install : true
install : true,
override_options: [cpp_std]
)
icd_file_name = 'libvulkan_dzn.so'