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/phosphor-regulators/meson.build b/phosphor-regulators/meson.build
index cd2c39c..a9a3dd5 100644
--- a/phosphor-regulators/meson.build
+++ b/phosphor-regulators/meson.build
@@ -4,6 +4,6 @@
subdir('src')
-if get_option('tests').enabled()
+if get_option('tests').allowed()
subdir('test')
endif
diff --git a/phosphor-regulators/test/meson.build b/phosphor-regulators/test/meson.build
index b290cd0..74695be 100644
--- a/phosphor-regulators/test/meson.build
+++ b/phosphor-regulators/test/meson.build
@@ -52,7 +52,7 @@
]
# Long-running tests that are excluded from CI
-if get_option('long-tests').enabled()
+if get_option('long-tests').allowed()
# This test requires the Python module 'jsonschema'
phosphor_regulators_tests_source_files += 'validate-regulators-config_tests.cpp'
endif
@@ -69,7 +69,7 @@
sdbusplus,
],
link_args: dynamic_linker,
- build_rpath: get_option('oe-sdk').enabled() ? rpath : '',
+ build_rpath: get_option('oe-sdk').allowed() ? rpath : '',
link_with: [
phosphor_regulators_library,
libi2c_dev_mock