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: I8671a81c57e5032c776691d30a941c19b1d53e9d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/dump-extensions/meson.build b/dump-extensions/meson.build
index 8f58f2c..fa18506 100644
--- a/dump-extensions/meson.build
+++ b/dump-extensions/meson.build
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
-if get_option('openpower-dumps-extension').enabled()
+if get_option('openpower-dumps-extension').allowed()
subdir('openpower-dumps')
else
subdir('default')
diff --git a/host-transport-extensions/pldm/meson.build b/host-transport-extensions/pldm/meson.build
index fc4c143..54f75ff 100644
--- a/host-transport-extensions/pldm/meson.build
+++ b/host-transport-extensions/pldm/meson.build
@@ -6,7 +6,7 @@
phosphor_dump_manager_dependency += [ dependency('libpldm') ]
-if get_option('openpower-dumps-extension').enabled()
+if get_option('openpower-dumps-extension').allowed()
subdir('oem/ibm')
else
subdir('default')
diff --git a/meson.build b/meson.build
index 98ce6d0..2b7538d1 100644
--- a/meson.build
+++ b/meson.build
@@ -100,7 +100,7 @@
conf_data.set('ERROR_MAP_YAML', get_option('ERROR_MAP_YAML'),
description : 'YAML filepath containing error object paths'
)
-conf_data.set('JFFS_CORE_FILE_WORKAROUND', get_option('jffs-workaround').enabled(),
+conf_data.set('JFFS_CORE_FILE_WORKAROUND', get_option('jffs-workaround').allowed(),
description : 'Turn on jffs workaround for core file'
)
conf_data.set_quoted('FAULTLOG_DUMP_OBJ_ENTRY', get_option('FAULTLOG_DUMP_OBJ_ENTRY'),
@@ -112,7 +112,7 @@
conf_data.set_quoted('FAULTLOG_DUMP_PATH', get_option('FAULTLOG_DUMP_PATH'),
description : 'Directory where fault logs are placed'
)
-conf_data.set('BMC_DUMP_ROTATE_CONFIG', get_option('dump_rotate_config').enabled(),
+conf_data.set('BMC_DUMP_ROTATE_CONFIG', get_option('dump_rotate_config').allowed(),
description : 'Turn on rotate config for bmc dump'
)
@@ -302,6 +302,6 @@
)
endforeach
-if get_option('tests').enabled()
+if get_option('tests').allowed()
subdir('test')
endif
diff --git a/test/meson.build b/test/meson.build
index 60cd774..a62b263 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