]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add header build tests for newer C and C++ standards 26687/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 6 Mar 2023 01:21:47 +0000 (10:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 6 Mar 2023 01:21:47 +0000 (10:21 +0900)
src/systemd/meson.build

index efe1036ce34ab314c6109c34bc02cca313fc0fac..5a8760deb527ba4a5e6b989f2829fdc4c41c6a95 100644 (file)
@@ -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]