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: I37fcb391dcb215a86a60c26f7512f6ccb8312dc4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/power-supply/meson.build b/power-supply/meson.build
index e2f1a37..d2251bf 100644
--- a/power-supply/meson.build
+++ b/power-supply/meson.build
@@ -21,6 +21,6 @@
record_manager = psu_monitor.extract_objects('record_manager.cpp')
-if get_option('tests').enabled()
+if get_option('tests').allowed()
subdir('test')
endif
diff --git a/power-supply/test/meson.build b/power-supply/test/meson.build
index f7523a0..39aec2a 100644
--- a/power-supply/test/meson.build
+++ b/power-supply/test/meson.build
@@ -12,7 +12,7 @@
implicit_include_directories: false,
include_directories: '../..',
link_args: dynamic_linker,
- build_rpath: get_option('oe-sdk').enabled() ? rpath : '',
+ build_rpath: get_option('oe-sdk').allowed() ? rpath : '',
link_with: [
libpower,
],