meson: Upgrade to C++20
Upgrading to C++20 allows us build sdbusplus as a subproject.
Alternatively we can wait for the following patch to sdbusplus:
https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/43568
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I621a39c9ec8e1047a2a702ec35b6e735e02cb592
diff --git a/meson.build b/meson.build
index 7ee3e2f..e47360b 100644
--- a/meson.build
+++ b/meson.build
@@ -4,10 +4,11 @@
default_options: [
'warning_level=3',
'werror=true',
- 'cpp_std=c++17'
+ 'cpp_std=c++20'
],
license: 'Apache-2.0',
version: '0.1',
+ meson_version: '>=0.57.0',
)
add_project_arguments(
@@ -26,9 +27,9 @@
i2c = meson.get_compiler('cpp').find_library('i2c')
sdbusplus = dependency('sdbusplus')
systemd = dependency('systemd')
-systemd_system_unit_dir = systemd.get_pkgconfig_variable(
- 'systemdsystemunitdir',
- define_variable: ['prefix', get_option('prefix')])
+systemd_system_unit_dir = systemd.get_variable(
+ pkgconfig: 'systemdsystemunitdir',
+ pkgconfig_define: ['prefix', get_option('prefix')])
threads = dependency('threads')
thresholds_a = static_library(