From: Yu Watanabe Date: Mon, 6 Mar 2023 01:21:47 +0000 (+0900) Subject: test: add header build tests for newer C and C++ standards X-Git-Tag: v254-rc1~1111^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F26687%2Fhead;p=thirdparty%2Fsystemd.git test: add header build tests for newer C and C++ standards --- diff --git a/src/systemd/meson.build b/src/systemd/meson.build index efe1036ce34..5a8760deb52 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -59,6 +59,10 @@ if cc.has_argument('-std=iso9899:2017') opts += [['c', '-std=iso9899:2017']] endif +if cc.has_argument('-std=c2x') + opts += [['c', '-std=c2x']] +endif + if cxx_cmd != '' opts += [['c++'], ['c++', '-std=c++98'], @@ -72,6 +76,9 @@ if cxx_cmd != '' if cxx.has_argument('-std=c++20') opts += [['c++', '-std=c++20']] endif + if cxx.has_argument('-std=c++23') + opts += [['c++', '-std=c++23']] + endif endif foreach header : _systemd_headers + _not_installed_headers + [libudev_h_path]