From 85a58f12f09795078b8bd2a26fce0465d46c36a2 Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Tue, 22 Nov 2022 23:20:05 +0100 Subject: interpreter: compiler: Allow array for the prefix kwarg --- .../snippets/compiler_prefix_property_array.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/markdown/snippets/compiler_prefix_property_array.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/compiler_prefix_property_array.md b/docs/markdown/snippets/compiler_prefix_property_array.md new file mode 100644 index 0000000..75b7156 --- /dev/null +++ b/docs/markdown/snippets/compiler_prefix_property_array.md @@ -0,0 +1,18 @@ +## Compiler check functions `prefix` kwargs accepts arrays + +The `prefix` kwarg that most compiler check functions support +now accepts an array in addition to a string. The elements of the +array will be concatenated separated by a newline. + +This makes it more readable to write checks that need multiple headers +to be included: + +```meson +cc.check_header('GL/wglew.h', prefix : ['#include ', '#include ']) +``` + +instead of + +```meson +cc.check_header('GL/wglew.h', prefix : '#include \n#include ']) +``` -- cgit v1.1