meson: prefer allowed over enabled
Features are tri-states: enabled, disabled, unset. There are
similarly 3 functions in meson: enabled(), disabled(), allowed().
Allowed should generally be preferred because it covers everything
except "enabled". This also allows repository options to be
simplified so that "enabled" does not need to be specified in each
`meson.option`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6e6f76c470a889b947ca076d35a99038993bb70d
diff --git a/meson.build b/meson.build
index 459421d..6a03c9a 100644
--- a/meson.build
+++ b/meson.build
@@ -68,11 +68,11 @@
common_include = include_directories('.')
-common_build = build_tests.allowed() or get_option('bios-software-update').enabled() or get_option(
+common_build = build_tests.allowed() or get_option('bios-software-update').allowed() or get_option(
'i2cvr-software-update',
-).enabled() or get_option(
+).allowed() or get_option(
'eepromdevice-software-update',
-).enabled()
+).allowed()
if common_build
libpldm_dep = dependency('libpldm')
@@ -86,16 +86,16 @@
subdir('common')
endif
-if get_option('bios-software-update').enabled()
+if get_option('bios-software-update').allowed()
subdir('bios')
endif
-if get_option('i2cvr-software-update').enabled()
+if get_option('i2cvr-software-update').allowed()
subdir('common/i2c/')
subdir('i2c-vr')
endif
-if get_option('eepromdevice-software-update').enabled()
+if get_option('eepromdevice-software-update').allowed()
subdir('eeprom-device')
endif