Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 1 | project( |
| 2 | 'dbus-sensors', |
| 3 | 'cpp', |
Patrick Williams | 77ae514 | 2023-07-21 10:04:53 -0500 | [diff] [blame] | 4 | default_options: ['warning_level=3', 'werror=true', 'cpp_std=c++23'], |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 5 | license: 'Apache-2.0', |
| 6 | version: '0.1', |
Patrick Williams | 77ae514 | 2023-07-21 10:04:53 -0500 | [diff] [blame] | 7 | meson_version: '>=1.1.1', |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 8 | ) |
| 9 | |
Patrick Williams | ab570a6 | 2023-12-07 14:49:43 -0600 | [diff] [blame] | 10 | # Enable io_uring for all daemons with below flags. |
Zhikui Ren | a0c6b5b | 2023-06-06 12:14:19 -0700 | [diff] [blame] | 11 | # '-DBOOST_ASIO_HAS_IO_URING', |
| 12 | # '-DBOOST_ASIO_DISABLE_EPOLL', |
Zhikui Ren | a0c6b5b | 2023-06-06 12:14:19 -0700 | [diff] [blame] | 13 | # 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 Tanous | 16966b5 | 2021-09-15 15:06:59 -0700 | [diff] [blame] | 16 | # https://github.com/openbmc/dbus-sensors/issues/19 |
Ed Tanous | 16966b5 | 2021-09-15 15:06:59 -0700 | [diff] [blame] | 17 | |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 18 | add_project_arguments( |
Andrew Jeffery | e3b23c0 | 2021-09-23 11:29:49 +0930 | [diff] [blame] | 19 | '-Wno-psabi', |
Ed Tanous | a771f6a | 2022-01-14 09:36:51 -0800 | [diff] [blame] | 20 | '-Wuninitialized', |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 21 | '-DBOOST_SYSTEM_NO_DEPRECATED', |
Ed Tanous | 83db50c | 2023-03-01 10:20:24 -0800 | [diff] [blame] | 22 | '-DBOOST_ASIO_NO_DEPRECATED', |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 23 | '-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 Ren | a0c6b5b | 2023-06-06 12:14:19 -0700 | [diff] [blame] | 29 | '-DBOOST_ASIO_HAS_IO_URING', |
| 30 | '-DBOOST_ASIO_DISABLE_EPOLL', |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 31 | language: 'cpp', |
| 32 | ) |
| 33 | |
Andrew Jeffery | e4f21f8 | 2024-01-04 13:05:16 +1030 | [diff] [blame] | 34 | threads = dependency('threads') |
Andrew Jeffery | 2d66c24 | 2021-05-27 12:57:50 +0930 | [diff] [blame] | 35 | # i2c-tools doesn't ship a pkg-config file for libi2c |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 36 | i2c = meson.get_compiler('cpp').find_library('i2c') |
Andrew Jeffery | 2673b9a | 2024-01-04 10:31:50 +1030 | [diff] [blame] | 37 | uring = dependency('liburing', include_type: 'system') |
Andrew Jeffery | e4f21f8 | 2024-01-04 13:05:16 +1030 | [diff] [blame] | 38 | nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system') |
| 39 | gpiodcxx = dependency('libgpiodcxx', default_options: ['bindings=cxx']) |
Andrew Jeffery | a47e082 | 2024-01-04 11:11:32 +1030 | [diff] [blame] | 40 | boost = dependency('boost', version: '>=1.83.0', include_type: 'system') |
Andrew Jeffery | e4f21f8 | 2024-01-04 13:05:16 +1030 | [diff] [blame] | 41 | sdbusplus = dependency('sdbusplus', include_type: 'system') |
| 42 | phosphor_logging_dep = dependency('phosphor-logging') |
Ed Tanous | 16966b5 | 2021-09-15 15:06:59 -0700 | [diff] [blame] | 43 | |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 44 | default_deps = [ |
Ed Tanous | 16966b5 | 2021-09-15 15:06:59 -0700 | [diff] [blame] | 45 | boost, |
Patrick Williams | ab570a6 | 2023-12-07 14:49:43 -0600 | [diff] [blame] | 46 | nlohmann_json_dep, |
Patrick Williams | 0c42f40 | 2021-08-27 16:05:45 -0500 | [diff] [blame] | 47 | phosphor_logging_dep, |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 48 | sdbusplus, |
Ed Tanous | 16966b5 | 2021-09-15 15:06:59 -0700 | [diff] [blame] | 49 | uring, |
Patrick Williams | 302a61a | 2021-08-27 15:40:08 -0500 | [diff] [blame] | 50 | ] |
| 51 | |
Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame] | 52 | subdir('service_files') |
| 53 | subdir('src') |