summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-11-29 15:45:06 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-11-29 15:45:06 +0300
commit549bed29de868521f646325a5533b25ba10aee1e (patch)
treeea3c166b2b85965438cc924baae65e47e94d0162
parent7a696974d7a987e3eb135a6cbad0a4ace8d109d2 (diff)
downloadbmcweb-549bed29de868521f646325a5533b25ba10aee1e.tar.xz
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: Ia40b13fdce7af88085cf23a4a87d9be939edd1e3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-rw-r--r--config/meson.build16
-rw-r--r--meson.build10
2 files changed, 13 insertions, 13 deletions
diff --git a/config/meson.build b/config/meson.build
index 7f2318f135..10ddb2dff2 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -3,23 +3,23 @@
conf_data = configuration_data()
conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
xss_enabled = get_option('insecure-disable-xss')
-conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled())
+conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.allowed())
enable_redfish_query = get_option('insecure-enable-redfish-query')
-conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled())
+conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.allowed())
# enable_redfish_aggregation = get_option('redfish-aggregation')
-# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.enabled())
+# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.allowed())
insecure_push_style_notification = get_option('insecure-push-style-notification')
-conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled())
+conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.allowed())
conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
conf_data.set('HTTPS_PORT', get_option('https_port'))
enable_health_populate = get_option('redfish-health-populate')
-conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.enabled())
+conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.allowed())
enable_proc_mem_status = get_option('redfish-enable-proccessor-memory-status')
-conf_data.set10('BMCWEB_ENABLE_PROC_MEM_STATUS', enable_proc_mem_status.enabled())
+conf_data.set10('BMCWEB_ENABLE_PROC_MEM_STATUS', enable_proc_mem_status.allowed())
enable_multi_host = get_option('experimental-redfish-multi-computer-system')
-conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.enabled())
+conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.allowed())
enable_http2 = get_option('experimental-http2')
-conf_data.set10('BMCWEB_ENABLE_HTTP2', enable_http2.enabled())
+conf_data.set10('BMCWEB_ENABLE_HTTP2', enable_http2.allowed())
# Logging level
loglvlopt = get_option('bmcweb-logging')
diff --git a/meson.build b/meson.build
index a4315f0e51..e1ee9c35d5 100644
--- a/meson.build
+++ b/meson.build
@@ -101,7 +101,7 @@ feature_map = {
# being enabled during the configuration time.
foreach option_key,option_value : feature_map
- if(get_option(option_key).enabled())
+ if(get_option(option_key).allowed())
if(option_key == 'mutual-tls-auth' or option_key == 'insecure-disable-ssl')
if(get_option('insecure-disable-ssl').disabled() or get_option('mutual-tls-auth').disabled())
add_project_arguments(option_value,language:'cpp')
@@ -124,7 +124,7 @@ foreach option_key,option_value : feature_map
endif
endforeach
-if(get_option('tests').enabled())
+if(get_option('tests').allowed())
summary('unittest','NA', section : 'Enabled Features')
endif
@@ -346,10 +346,10 @@ else
]
endif
-if get_option('tests').enabled()
+if get_option('tests').allowed()
gtest = dependency('gtest', main: true, disabler: true, required : false)
gmock = dependency('gmock', required : false)
- if not gtest.found() and get_option('tests').enabled()
+ if not gtest.found() and get_option('tests').allowed()
gtest_proj = subproject('gtest', required: true)
gtest = gtest_proj.get_variable('gtest_main_dep')
gmock = gtest_proj.get_variable('gmock_dep')
@@ -445,7 +445,7 @@ srcfiles_unittest = files(
'test/redfish-core/lib/power_subsystem_test.cpp',
)
-if(get_option('tests').enabled())
+if(get_option('tests').allowed())
# generate the test executable
foreach test_src : srcfiles_unittest
test_bin = executable(