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: I2f446393dfb207d1429ec4a3a0c6b66f23e30ec7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 4f0e3c6..269ec49 100644
--- a/meson.build
+++ b/meson.build
@@ -108,7 +108,7 @@
no_listener_mode = get_option('nlmode')
-if not no_listener_mode.disabled()
+if no_listener_mode.allowed()
executable(
'openpower-hw-diags',
sources: ['main_nl.cpp', 'cli.cpp', buildinfo, plugins_src],
@@ -138,7 +138,7 @@
build_tests = get_option('tests')
-if not build_tests.disabled()
+if build_tests.allowed()
# IMPORTANT NOTE:
# We cannot link the test executables to `util_lib` because: