mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
Merge branch 'ebassi/override-test-c_args' into 'main'
build: Use C89 for the standard version check See merge request GNOME/glib!4091
This commit is contained in:
commit
4fde1a6cfc
@ -372,10 +372,12 @@ foreach test_name, extra_args : glib_tests
|
||||
'@0@-c-@1@'.format(test_name, std) : extra_args + {
|
||||
'source' : extra_args.get('source', test_name + '.c'),
|
||||
'suite' : ['cc'] + extra_args.get('suite', []),
|
||||
'c_args' : [
|
||||
c_standards.get(std),
|
||||
'-D_G_EXPECTED_C_STANDARD="@0@"'.format(std)
|
||||
] + extra_args.get('c_args', []),
|
||||
'override_options' : extra_args.get('override_options', []) + [
|
||||
'c_std=c@0@'.format(std),
|
||||
],
|
||||
'c_args' : extra_args.get('c_args', []) + [
|
||||
'-D_G_EXPECTED_C_STANDARD="@0@"'.format(std),
|
||||
],
|
||||
}
|
||||
}
|
||||
endif
|
||||
|
@ -14,7 +14,7 @@ fs = import('fs')
|
||||
cc = meson.get_compiler('c')
|
||||
c_standards = {}
|
||||
|
||||
foreach std : ['90', '99', '11', '17']
|
||||
foreach std : ['89', '99', '11', '17']
|
||||
arg = (cc.get_id() == 'msvc' ? '/std:' : '-std=') + 'c' + std
|
||||
if cc.has_argument(arg)
|
||||
c_standards += { std: arg }
|
||||
|
Loading…
Reference in New Issue
Block a user