build: use allowed over enabled or not-disabled
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`.
Switch all uses of `not disabled` to `allowed`.
Change-Id: I88a4676fbcc5ea0ac31835976bb0775867464778
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index da267b6..8170268 100644
--- a/meson.build
+++ b/meson.build
@@ -70,7 +70,7 @@
'CHASSIS_ON_FILE', '/run/openbmc/chassis@{}-on')
conf.set(
- 'CHECK_FWUPDATE_BEFORE_DO_TRANSITION', get_option('check-fwupdate-before-do-transition').enabled())
+ 'CHECK_FWUPDATE_BEFORE_DO_TRANSITION', get_option('check-fwupdate-before-do-transition').allowed())
configure_file(output: 'config.h', configuration: conf)
@@ -288,7 +288,7 @@
# If test coverage of source files within the root directory are wanted,
# need to define and build the tests from here
-if not build_tests.disabled()
+if build_tests.allowed()
gtest = dependency('gtest', main: true, disabler: true, required: build_tests)
gmock = dependency('gmock', disabler: true, required: build_tests)
test(