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 if add_languages('cpp', 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 + _not_installed_headers + ['../libudev/libudev.h']
69 name = ''.join(['cc-', header.split('/')[-1], ':'] + opt)
70 if want_tests != 'false'
73 args : cc.cmd_array() + ['-c', '-x'] + opt +
74 ['-Werror', '-include',
75 join_paths(meson.current_source_dir(), header)])