blob: d1f120748482d239982cc6634b9a81f7fd4dc3a3 [file] [log] [blame]
Brad Bishopfeb19ef2019-11-07 18:02:16 -05001project(
2 'dbus-sensors',
3 'cpp',
Patrick Williams77ae5142023-07-21 10:04:53 -05004 default_options: ['warning_level=3', 'werror=true', 'cpp_std=c++23'],
Brad Bishopfeb19ef2019-11-07 18:02:16 -05005 license: 'Apache-2.0',
6 version: '0.1',
Patrick Williams77ae5142023-07-21 10:04:53 -05007 meson_version: '>=1.1.1',
Brad Bishopfeb19ef2019-11-07 18:02:16 -05008)
9
Patrick Williamsab570a62023-12-07 14:49:43 -060010# Enable io_uring for all daemons with below flags.
Zhikui Rena0c6b5b2023-06-06 12:14:19 -070011# '-DBOOST_ASIO_HAS_IO_URING',
12# '-DBOOST_ASIO_DISABLE_EPOLL',
Zhikui Rena0c6b5b2023-06-06 12:14:19 -070013# Note, there is currently an issue with CPUSensor when used in
14# conjunction with io_uring. So it has not been changed to use
15# random file access. But we'd like to enable it for all daemons.
Ed Tanous16966b52021-09-15 15:06:59 -070016# https://github.com/openbmc/dbus-sensors/issues/19
Ed Tanous16966b52021-09-15 15:06:59 -070017
Brad Bishopfeb19ef2019-11-07 18:02:16 -050018add_project_arguments(
Andrew Jefferye3b23c02021-09-23 11:29:49 +093019 '-Wno-psabi',
Ed Tanousa771f6a2022-01-14 09:36:51 -080020 '-Wuninitialized',
Brad Bishopfeb19ef2019-11-07 18:02:16 -050021 '-DBOOST_SYSTEM_NO_DEPRECATED',
Ed Tanous83db50c2023-03-01 10:20:24 -080022 '-DBOOST_ASIO_NO_DEPRECATED',
Brad Bishopfeb19ef2019-11-07 18:02:16 -050023 '-DBOOST_ERROR_CODE_HEADER_ONLY',
24 '-DBOOST_NO_RTTI',
25 '-DBOOST_NO_TYPEID',
26 '-DBOOST_ALL_NO_LIB',
27 '-DBOOST_ASIO_DISABLE_THREADS',
28 '-DBOOST_ALLOW_DEPRECATED_HEADERS',
Zhikui Rena0c6b5b2023-06-06 12:14:19 -070029 '-DBOOST_ASIO_HAS_IO_URING',
30 '-DBOOST_ASIO_DISABLE_EPOLL',
Brad Bishopfeb19ef2019-11-07 18:02:16 -050031 language: 'cpp',
32)
33
Andrew Jefferye4f21f82024-01-04 13:05:16 +103034threads = dependency('threads')
Andrew Jeffery2d66c242021-05-27 12:57:50 +093035# i2c-tools doesn't ship a pkg-config file for libi2c
Brad Bishopfeb19ef2019-11-07 18:02:16 -050036i2c = meson.get_compiler('cpp').find_library('i2c')
Andrew Jeffery2673b9a2024-01-04 10:31:50 +103037uring = dependency('liburing', include_type: 'system')
Andrew Jefferye4f21f82024-01-04 13:05:16 +103038nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
39gpiodcxx = dependency('libgpiodcxx', default_options: ['bindings=cxx'])
Andrew Jefferya47e0822024-01-04 11:11:32 +103040boost = dependency('boost', version: '>=1.83.0', include_type: 'system')
Andrew Jefferye4f21f82024-01-04 13:05:16 +103041sdbusplus = dependency('sdbusplus', include_type: 'system')
42phosphor_logging_dep = dependency('phosphor-logging')
Ed Tanous16966b52021-09-15 15:06:59 -070043
Patrick Williams302a61a2021-08-27 15:40:08 -050044default_deps = [
Ed Tanous16966b52021-09-15 15:06:59 -070045 boost,
Patrick Williamsab570a62023-12-07 14:49:43 -060046 nlohmann_json_dep,
Patrick Williams0c42f402021-08-27 16:05:45 -050047 phosphor_logging_dep,
Patrick Williams302a61a2021-08-27 15:40:08 -050048 sdbusplus,
Ed Tanous16966b52021-09-15 15:06:59 -070049 uring,
Patrick Williams302a61a2021-08-27 15:40:08 -050050]
51
Brad Bishopfeb19ef2019-11-07 18:02:16 -050052subdir('service_files')
53subdir('src')