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: I3e26b283457a6442d20adeca3f40bf0269009a3c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/dist/meson.build b/dist/meson.build
index bfcd0f4..ce55cdb 100644
--- a/dist/meson.build
+++ b/dist/meson.build
@@ -7,12 +7,12 @@
service_files = ['phosphor-certificate-manager@.service']
systemd_alias = []
-if not get_option('ca-cert-extension').disabled()
+if get_option('ca-cert-extension').allowed()
busconfig += 'busconfig/bmc-vmi-ca.conf'
service_files += 'bmc-vmi-ca-manager.service'
endif
-if not get_option('config-bmcweb').disabled()
+if get_option('config-bmcweb').allowed()
busconfig += 'busconfig/phosphor-bmcweb-cert-config.conf'
certs += 'env/bmcweb'
systemd_alias += [
@@ -23,7 +23,7 @@
]
endif
-if not get_option('config-authority').disabled()
+if get_option('config-authority').allowed()
busconfig += 'busconfig/phosphor-authority-cert-config.conf'
certs += 'env/authority'
systemd_alias += [
diff --git a/meson.build b/meson.build
index a4b5281..03f3031 100644
--- a/meson.build
+++ b/meson.build
@@ -37,7 +37,7 @@
config_data.set('authority_limit', get_option('authority-limit'))
config_data.set('authorities_list_name', get_option('authorities-list-name'))
-if not get_option('allow-expired').disabled()
+if get_option('allow-expired').allowed()
config_data.set('allow_expired', 'true')
else
config_data.set('allow_expired', 'false')
@@ -83,13 +83,13 @@
install: true,
)
-if not get_option('ca-cert-extension').disabled()
+if get_option('ca-cert-extension').allowed()
subdir('bmc-vmi-ca')
endif
subdir('dist')
-if not get_option('tests').disabled()
+if get_option('tests').allowed()
subdir('test')
endif
diff --git a/test/meson.build b/test/meson.build
index 425cc2a..8d103f7 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -41,7 +41,7 @@
# considering valgrind enabled path setting up this 500 sec.
)
-if not get_option('ca-cert-extension').disabled()
+if get_option('ca-cert-extension').allowed()
test(
'test_ca_certs_manager',
executable(