mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 23:48:44 +02:00
meson: Compile some tests with multiple C standards
We need to ensure that all the expected macros and utilities are working with all the supported C standards, so just repeat the tests with all the ones the compiler supports.
This commit is contained in:
@@ -10,6 +10,15 @@ project('glib', 'c',
|
||||
)
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
c_standards = {}
|
||||
|
||||
foreach std : ['90', '99', '11', '17']
|
||||
arg = (cc.get_id() == 'msvc' ? '/std:' : '-std=') + 'c' + std
|
||||
if cc.has_argument(arg)
|
||||
c_standards += { std: arg }
|
||||
endif
|
||||
endforeach
|
||||
|
||||
have_cxx = add_languages('cpp', native: false, required: get_option('oss_fuzz').enabled())
|
||||
if have_cxx
|
||||
cxx = meson.get_compiler('cpp')
|
||||
|
Reference in New Issue
Block a user