Add boost wrap file
Recent changes make us incompatible with older versions of boost (1.74
in my testing). Like we do elsewhere, add a wrapfile for boost.
At the same time, the tests were missing an explicit #include for boost,
so even when the above patch was applied, it still doesn't build. Add
an explicit dependency.
Tested:
meson buildlocal --buildtype=debug && ninja -C buildlocal
Succeeds. Should have no impact to yocto builds.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I20543fd184491dc138a2e145945eb71051c4cd52
diff --git a/meson.build b/meson.build
index e86c378..85e2ee0 100644
--- a/meson.build
+++ b/meson.build
@@ -15,7 +15,13 @@
phosphor_logging = dependency('phosphor-logging')
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
sdbusplus = dependency('sdbusplus')
-
+boost = dependency('boost', version : '>=1.79.0', required: false, include_type: 'system')
+if not boost.found()
+ subproject('boost', required: false)
+ boost_inc = include_directories('subprojects/boost_1_79_0/', is_system:true)
+ boost = declare_dependency(include_directories : boost_inc)
+ boost = boost.as_system('system')
+endif
if get_option('buildtype').startswith('debug')
add_project_arguments('-DMAPPER_ENABLE_DEBUG', language : 'cpp')
@@ -84,7 +90,7 @@
'src/associations.cpp',
],
dependencies: [
- dependency('boost'),
+ boost,
dependency('libsystemd'),
phosphor_dbus_interfaces,
phosphor_logging,