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: I115a52f288be4115297a848afa241f902f48dec2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/example/meson.build b/example/meson.build
index c7ebf61..4911a67 100644
--- a/example/meson.build
+++ b/example/meson.build
@@ -14,7 +14,7 @@
endif
assert(
- not get_option('examples').enabled() or has_asio,
+ not get_option('examples').allowed() or has_asio,
'Boost is required when examples are enabled'
)
diff --git a/test/meson.build b/test/meson.build
index 2efdfeb..b72bff0 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
@@ -55,7 +55,7 @@
endforeach
assert(
- not get_option('tests').enabled() or boost_dep.found(),
+ not get_option('tests').allowed() or boost_dep.found(),
'Boost is required when tests are enabled'
)