cc = meson.get_compiler('c')
pkgconfig = import('pkgconfig')
-check_compilation_sh = find_program('tools/check-compilation.sh')
meson_build_sh = find_program('tools/meson-build.sh')
want_tests = get_option('tests')
foreach header : _systemd_headers + _not_installed_headers + [libudev_h_path]
foreach opt : opts
std_name = opt.length() == 2 ? '_'.join(opt[1].split(':')) : ''
- name = ''.join(['cc-', header.split('/')[-1], '_', opt[0], std_name])
- test(name,
- check_compilation_sh,
- args : cc.cmd_array() + ['-c', '-x'] + opt +
- ['-Werror', '-include',
- meson.current_source_dir() / header])
+ test('cc-' + header.split('/')[-1] + '_' + opt[0] + std_name,
+ env,
+ args : [cc.cmd_array(),
+ '-c',
+ '-x', opt,
+ '-Werror',
+ '-include', meson.current_source_dir() / header,
+ '-o/dev/null',
+ '/dev/null'])
endforeach
endforeach