]>
Commit | Line | Data |
---|---|---|
3a726fcd ZJS |
1 | # SPDX-License-Identifier: LGPL-2.1+ |
2 | # | |
3 | # Copyright 2017 Zbigniew Jędrzejewski-Szmek | |
3a726fcd | 4 | |
fdd147a8 | 5 | _systemd_headers = ''' |
37efbbd8 ZJS |
6 | sd-bus.h |
7 | sd-bus-protocol.h | |
8 | sd-bus-vtable.h | |
9 | sd-daemon.h | |
10 | sd-event.h | |
11 | sd-id128.h | |
12 | sd-journal.h | |
13 | sd-login.h | |
14 | sd-messages.h | |
fdd147a8 ZJS |
15 | '''.split() |
16 | ||
17 | # https://github.com/mesonbuild/meson/issues/1633 | |
18 | systemd_headers = files(_systemd_headers) | |
5c23128d ZJS |
19 | |
20 | # sd-device.h | |
21 | # sd-hwdb.h | |
22 | # sd-dhcp6-client.h | |
23 | # sd-dhcp6-lease.h | |
24 | # sd-dhcp-client.h | |
25 | # sd-dhcp-lease.h | |
26 | # sd-dhcp-server.h | |
27 | # sd-ipv4acd.h | |
28 | # sd-ipv4ll.h | |
29 | # sd-lldp.h | |
30 | # sd-ndisc.h | |
31 | # sd-netlink.h | |
32 | # sd-network.h | |
33 | # sd-path.h | |
34 | # sd-resolve.h | |
35 | # sd-utf8.h | |
36 | ||
37ab1a25 | 37 | install_headers( |
37efbbd8 ZJS |
38 | systemd_headers, |
39 | '_sd-common.h', | |
40 | subdir : 'systemd') | |
fdd147a8 ZJS |
41 | |
42 | ||
43 | ############################################################ | |
44 | ||
d7f149c1 ZJS |
45 | opts = [['c'], |
46 | ['c', '-ansi'], | |
ec36d052 DC |
47 | ['c', '-std=iso9899:1990']] |
48 | ||
49 | cxx = find_program('c++', required : false) | |
50 | if cxx.found() | |
51 | opts += [['c++']] | |
52 | endif | |
fdd147a8 ZJS |
53 | |
54 | foreach header : _systemd_headers | |
37efbbd8 | 55 | foreach opt : opts |
d7f149c1 | 56 | name = ''.join([header, ':'] + opt) |
37efbbd8 ZJS |
57 | test('cc-' + name, |
58 | check_compilation_sh, | |
d7f149c1 | 59 | args : cc.cmd_array() + ['-c', '-x'] + opt + |
37efbbd8 ZJS |
60 | ['-Werror', '-include', |
61 | join_paths(meson.current_source_dir(), header)]) | |
62 | endforeach | |
fdd147a8 | 63 | endforeach |