mirror of
https://github.com/systemd/systemd
synced 2024-10-15 12:34:37 +00:00
Merge pull request #17640 from keszybz/meson-test-c++20
Also test headers against c++20
This commit is contained in:
commit
1598b07da3
|
@ -1594,6 +1594,7 @@ generate_gperfs = find_program('tools/generate-gperfs.py')
|
||||||
|
|
||||||
subdir('po')
|
subdir('po')
|
||||||
subdir('catalog')
|
subdir('catalog')
|
||||||
|
subdir('src/libudev')
|
||||||
subdir('src/systemd')
|
subdir('src/systemd')
|
||||||
subdir('src/basic')
|
subdir('src/basic')
|
||||||
subdir('src/libsystemd')
|
subdir('src/libsystemd')
|
||||||
|
@ -1673,7 +1674,6 @@ update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
|
||||||
# usually, but not always, installed in /bin.
|
# usually, but not always, installed in /bin.
|
||||||
public_programs = []
|
public_programs = []
|
||||||
|
|
||||||
subdir('src/libudev')
|
|
||||||
subdir('src/shared')
|
subdir('src/shared')
|
||||||
subdir('src/core')
|
subdir('src/core')
|
||||||
subdir('src/shutdown')
|
subdir('src/shutdown')
|
||||||
|
|
|
@ -64,9 +64,12 @@ if add_languages('cpp', required : false)
|
||||||
if cxx.has_argument('-std=c++17')
|
if cxx.has_argument('-std=c++17')
|
||||||
opts += [['c++', '-std=c++17']]
|
opts += [['c++', '-std=c++17']]
|
||||||
endif
|
endif
|
||||||
|
if cxx.has_argument('-std=c++20')
|
||||||
|
opts += [['c++', '-std=c++20']]
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h']
|
foreach header : _systemd_headers + _not_installed_headers + [libudev_h_path]
|
||||||
foreach opt : opts
|
foreach opt : opts
|
||||||
std_name = opt.length() == 2 ? '_'.join(opt[1].split(':')) : ''
|
std_name = opt.length() == 2 ? '_'.join(opt[1].split(':')) : ''
|
||||||
name = ''.join(['cc-', header.split('/')[-1], '_', opt[0], std_name])
|
name = ''.join(['cc-', header.split('/')[-1], '_', opt[0], std_name])
|
||||||
|
|
Loading…
Reference in a new issue