mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 15:38:44 +02:00
meson: Build C++ tests for the currently supported C++ standard versions
We've various macros definitions that are depending using C++ features that may not work in all the standard versions, so recompile the cxx tests that we have in all the ones we want to support.
This commit is contained in:
@@ -13,6 +13,14 @@ cc = meson.get_compiler('c')
|
||||
have_cxx = add_languages('cpp', native: false, required: get_option('oss_fuzz').enabled())
|
||||
if have_cxx
|
||||
cxx = meson.get_compiler('cpp')
|
||||
cxx_standards = {}
|
||||
|
||||
foreach std : ['98', '03', '11', '14', '17', '20', '2b', 'latest']
|
||||
arg = (cxx.get_id() == 'msvc' ? '/std:' : '-std=') + 'c++' + std
|
||||
if cxx.has_argument(arg)
|
||||
cxx_standards += { std: arg }
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
|
||||
cc_can_run = meson.can_run_host_binaries()
|
||||
|
Reference in New Issue
Block a user