1 # SPDX-License-Identifier: LGPL-2.1-or-later
18 # https://github.com/mesonbuild/meson/issues/1633
19 systemd_headers = files(_systemd_headers)
21 _not_installed_headers = '''
46 ############################################################
50 ['c', '-std=iso9899:1990'],
51 ['c', '-std=iso9899:2011']]
53 if cc.has_argument('-std=iso9899:2017')
54 opts += [['c', '-std=iso9899:2017']]
57 if add_languages('cpp', required : false)
59 ['c++', '-std=c++98'],
60 ['c++', '-std=c++11']]
61 if cc.has_argument('-std=c++14')
62 opts += [['c++', '-std=c++14']]
64 if cc.has_argument('-std=c++17')
65 opts += [['c++', '-std=c++17']]
69 foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h']
71 name = ''.join(['cc-', header.split('/')[-1], ':'] + opt)
72 if want_tests != 'false'
75 args : cc.cmd_array() + ['-c', '-x'] + opt +
76 ['-Werror', '-include',
77 join_paths(meson.current_source_dir(), header)])