From 088727164de8496c4bada040c2f4690e42f66b69 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Sat, 8 Oct 2022 21:14:37 +0000 Subject: interpreter/mesonmain: Add build_options method This method allows meson.build to introspect on the changed options. It works by merely exposing the same set of data that is logged by MesonApp._generate. Fixes #10898 --- docs/yaml/builtins/meson.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs/yaml/builtins') diff --git a/docs/yaml/builtins/meson.yaml b/docs/yaml/builtins/meson.yaml index 5ef445d..966159c 100644 --- a/docs/yaml/builtins/meson.yaml +++ b/docs/yaml/builtins/meson.yaml @@ -164,6 +164,21 @@ methods: - `vs2022` - `xcode` + - name: build_options + returns: str + since: 1.1.0 + description: | + Returns a string with the configuration line used to set the current project up. + notes: + - | + **Do not try to parse this string!** + + You should use [[cfg_data.set_quoted]] to safely escape any embedded + quotes prior to storing it into e.g. a C header macro. + + The contents returned by this function are the same as the + "Build Options:" line reported in `/meson-logs/meson-log.txt`. + - name: build_root returns: str deprecated: 0.56.0 -- cgit v1.1