1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright © 2017 Zbigniew Jędrzejewski-Szmek
17 # https://github.com/mesonbuild/meson/issues/1633
18 systemd_headers = files(_systemd_headers)
43 ############################################################
47 ['c', '-std=iso9899:1990'],
48 ['c', '-std=iso9899:2011']]
50 if cc.has_argument('-std=iso9899:2017')
51 opts += [['c', '-std=iso9899:2017']]
54 cxx = find_program('c++', required : false)
57 ['c++', '-std=c++98'],
58 ['c++', '-std=c++11']]
59 if cc.has_argument('-std=c++14')
60 opts += [['c++', '-std=c++14']]
62 if cc.has_argument('-std=c++17')
63 opts += [['c++', '-std=c++17']]
67 foreach header : _systemd_headers
69 name = ''.join([header, ':'] + opt)
72 args : cc.cmd_array() + ['-c', '-x'] + opt +
73 ['-Werror', '-include',
74 join_paths(meson.current_source_dir(), header)])