Add support for building with meson

Follow the OpenBMC herd and support a modern, comprehensible build
framework.

To build with meson:
  meson build
  ninja -C build
OR
  bitbake dbus-sensors

Add -Dtests to match de-facto OpenBMC meson usage conventions.

Maintain existing per-sensor config flags; however, do not define
targets when opting out of a sensor class.

One noteable omission is support for subprojects or vendoring.

The OpenBMC CI scripts look for meson.build before looking for
CMakelists so approval of this patch would change the build system
during CI to meson.

meta-phosphor change to update the recipe to meson is also coming
shortly.

Change-Id: I27d8c8f5761850d760428ed813eecd41e8f47c33
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Ed Tanous <ed@tanous.net>
12 files changed
tree: f63a48d6cacad33be25387aa6f0772d62303a25b
  1. include/
  2. service_files/
  3. src/
  4. tests/
  5. .clang-format
  6. .clang-ignore
  7. .gitignore
  8. Jenkinsfile
  9. LICENSE
  10. MAINTAINERS
  11. meson.build
  12. meson_options.txt
  13. README.md
README.md

dbus-sensors

dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.

key features

  • runtime re-configurable from d-bus (entity-manager or the like)

  • isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible

  • async single-threaded: uses sdbusplus/asio bindings

  • multiple data inputs: hwmon, d-bus, direct driver access