summaryrefslogtreecommitdiff
path: root/amdgpu
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-09-01 12:23:35 -0700
committerSimon Ser <contact@emersion.fr>2023-10-20 05:21:01 +0000
commit16e6a965051fae4d5142e9f16c47bb6bd3dd6f59 (patch)
treea256dde05cfb7a96285b4927f313b1836208b63f /amdgpu
parenta6a2ccb4486306c3caa5ccd337d972b61b97f75a (diff)
meson: Use feature.require() and feature.allowed()
To reduce the size and complexity of checks. require() allows combining auto and enabled checks(), so that something like ```meson x = get_option('feature') y = false if x.enabled() if not condition error(...) endif y = condition endif ``` can be rewritten as: ```meson y = get_option('feature').require(condition, error_message : ...).allowed() ``` require checks the condition, then if the feature is required it emits an error with the given message otherwise it returns a disabled feature. allowed then returns whether the feature is not disabled, and returns that (ie, .allowed() == not .disabled()). This is especially helpful for longer more complex conditions Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Diffstat (limited to 'amdgpu')
0 files changed, 0 insertions, 0 deletions