build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I4db060ea85cfae7be96693ec04a09829767351a1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/fault-monitor/meson.build b/fault-monitor/meson.build
index 39ec458..c314665 100644
--- a/fault-monitor/meson.build
+++ b/fault-monitor/meson.build
@@ -2,7 +2,7 @@
'monitor-main.cpp',
]
-if get_option('monitor-operational-status').enabled()
+if get_option('monitor-operational-status').allowed()
fault_monitor_sources += [
'../utils.cpp',
'operational-status-monitor.cpp',
diff --git a/manager/meson.build b/manager/meson.build
index b3eddeb..e2452bd 100644
--- a/manager/meson.build
+++ b/manager/meson.build
@@ -19,7 +19,7 @@
sources += [led_gen_hpp]
endif
-if get_option('use-lamp-test').enabled()
+if get_option('use-lamp-test').allowed()
conf_data.set_quoted('LAMP_TEST_OBJECT', '/xyz/openbmc_project/led/groups/lamp_test')
conf_data.set_quoted('HOST_LAMP_TEST_OBJECT', '/xyz/openbmc_project/led/groups/host_lamp_test')
conf_data.set_quoted('LAMP_TEST_LED_OVERRIDES_JSON', '/usr/share/phosphor-led-manager/lamp-test-led-overrides.json')
diff --git a/meson.build b/meson.build
index d4ee899..f2502a1 100644
--- a/meson.build
+++ b/meson.build
@@ -19,10 +19,10 @@
conf_data.set_quoted('LED_FAULT', 'fault')
conf_data.set('CLASS_VERSION', 1)
-conf_data.set('LED_USE_JSON', get_option('use-json').enabled())
-conf_data.set('USE_LAMP_TEST', get_option('use-lamp-test').enabled())
-conf_data.set('MONITOR_OPERATIONAL_STATUS', get_option('monitor-operational-status').enabled())
-conf_data.set('PERSISTENT_LED_ASSERTED', get_option('persistent-led-asserted').enabled())
+conf_data.set('LED_USE_JSON', get_option('use-json').allowed())
+conf_data.set('USE_LAMP_TEST', get_option('use-lamp-test').allowed())
+conf_data.set('MONITOR_OPERATIONAL_STATUS', get_option('monitor-operational-status').allowed())
+conf_data.set('PERSISTENT_LED_ASSERTED', get_option('persistent-led-asserted').allowed())
sdbusplus_dep = dependency('sdbusplus')
sdeventplus_dep = dependency('sdeventplus')
diff --git a/test/meson.build b/test/meson.build
index 29d4b95..300e977 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -13,7 +13,7 @@
gmock_dep = gtest_proj.dependency('gmock')
else
assert(
- not get_option('tests').enabled(),
+ not get_option('tests').allowed(),
'Googletest is required if tests are enabled'
)
endif
@@ -28,7 +28,7 @@
'utest.cpp',
'utest-led-json.cpp',
]
-if get_option('persistent-led-asserted').enabled()
+if get_option('persistent-led-asserted').allowed()
test_sources += [
'../manager/serialize.cpp',
]