From ace22f21a7f0abe9250e673a258e4adf3afa4ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 25 Feb 2021 11:29:55 +0000 Subject: meson: add .has_external_property() methods Useful in case of boolean values to distinguish between a boolean value having been set in the native/cross file and not having been provided, which can't be achieved by passing a fallback parameter to .get_external_property(). --- docs/markdown/snippets/has_external_property.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/markdown/snippets/has_external_property.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/has_external_property.md b/docs/markdown/snippets/has_external_property.md new file mode 100644 index 0000000..8a815d7 --- /dev/null +++ b/docs/markdown/snippets/has_external_property.md @@ -0,0 +1,7 @@ +## Check if native or cross-file properties exist + +It is now possible to check whether a native property or a cross-file property +exists with `meson.has_external_property('foo')`. This is useful if the +property in question is a boolean and one wants to distinguish between +"set" and "not provided" which can't be done the usual way by passing a +fallback parameter to `meson.get_external_property()` in this particular case. -- cgit v1.1