unit-fail-monitor: add meson option to disable
Add an option to disable this feature.
Change-Id: Ifc953ad4bec492f7c6ca8190e4c6a0820b12630a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meson.build b/meson.build
index 3f24805..ef7e203 100644
--- a/meson.build
+++ b/meson.build
@@ -149,15 +149,17 @@
'src/dbus/xyz.openbmc_project.ObjectMapper.conf',
install_dir: get_option('datadir') / 'dbus-1' / 'system.d')
-executable(
- 'phosphor-unit-failure-monitor',
- [
- 'fail-monitor/main.cpp',
- 'fail-monitor/monitor.cpp',
- ],
- dependencies: [
- cli11_dep,
- phosphor_logging,
- ],
- install: true
-)
+if not get_option('unit-failure-monitor').disabled()
+ executable(
+ 'phosphor-unit-failure-monitor',
+ [
+ 'fail-monitor/main.cpp',
+ 'fail-monitor/monitor.cpp',
+ ],
+ dependencies: [
+ cli11_dep,
+ phosphor_logging,
+ ],
+ install: true
+ )
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 71f7241..bf610a6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,10 @@
value: 'enabled',
description: 'Build tests'
)
+
+option(
+ 'unit-failure-monitor',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Build phosphor-unit-failure-monitor'
+)