1 # SPDX-License-Identifier: LGPL-2.1+
17 # https://github.com/mesonbuild/meson/issues/1633
18 systemd_headers = files(_systemd_headers)
41 ############################################################
45 ['c', '-std=iso9899:1990'],
46 ['c', '-std=iso9899:2011']]
48 if cc.has_argument('-std=iso9899:2017')
49 opts += [['c', '-std=iso9899:2017']]
52 cxx = find_program('c++', required : false)
55 ['c++', '-std=c++98'],
56 ['c++', '-std=c++11']]
57 if cc.has_argument('-std=c++14')
58 opts += [['c++', '-std=c++14']]
60 if cc.has_argument('-std=c++17')
61 opts += [['c++', '-std=c++17']]
65 foreach header : _systemd_headers
67 name = ''.join([header, ':'] + opt)
68 if want_tests != 'false'
71 args : cc.cmd_array() + ['-c', '-x'] + opt +
72 ['-Werror', '-include',
73 join_paths(meson.current_source_dir(), header)])