1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

meson: Exit early with subdir_done()

This commit is contained in:
Jan Janssen 2022-05-02 10:37:31 +02:00
parent c322cfafba
commit 3d35c6d47e

View File

@ -46,6 +46,10 @@ install_headers(
############################################################
if want_tests == 'false'
subdir_done()
endif
opts = [['c'],
['c', '-ansi'],
['c', '-std=iso9899:1990'],
@ -74,12 +78,10 @@ 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])
if want_tests != 'false'
test(name,
check_compilation_sh,
args : cc.cmd_array() + ['-c', '-x'] + opt +
['-Werror', '-include',
meson.current_source_dir() / header])
endif
test(name,
check_compilation_sh,
args : cc.cmd_array() + ['-c', '-x'] + opt +
['-Werror', '-include',
meson.current_source_dir() / header])
endforeach
endforeach