1 # SPDX-License-Identifier: LGPL-2.1+
17 # https://github.com/mesonbuild/meson/issues/1633
18 systemd_headers = files(_systemd_headers)
20 _not_installed_headers = '''
44 ############################################################
48 ['c', '-std=iso9899:1990'],
49 ['c', '-std=iso9899:2011']]
51 if cc.has_argument('-std=iso9899:2017')
52 opts += [['c', '-std=iso9899:2017']]
55 cxx = find_program('c++', required : false)
58 ['c++', '-std=c++98'],
59 ['c++', '-std=c++11']]
60 if cc.has_argument('-std=c++14')
61 opts += [['c++', '-std=c++14']]
63 if cc.has_argument('-std=c++17')
64 opts += [['c++', '-std=c++17']]
68 foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h']
70 name = ''.join(['cc-', header.split('/')[-1], ':'] + opt)
71 if want_tests != 'false'
74 args : cc.cmd_array() + ['-c', '-x'] + opt +
75 ['-Werror', '-include',
76 join_paths(meson.current_source_dir(), header)])