summaryrefslogtreecommitdiff
path: root/docs/yaml
diff options
context:
space:
mode:
authorL. E. Segovia <amy@amyspark.me>2022-10-08 21:14:37 +0000
committerEli Schwartz <eschwartz93@gmail.com>2023-02-20 11:05:06 -0500
commit088727164de8496c4bada040c2f4690e42f66b69 (patch)
tree26baacb88fd6761363be89bf2b0aa0ea78bfe628 /docs/yaml
parentc2b0ca0fb9d7e6850874ae7c1c755982676f593d (diff)
downloadmeson-088727164de8496c4bada040c2f4690e42f66b69.tar.gz
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
Diffstat (limited to 'docs/yaml')
-rw-r--r--docs/yaml/builtins/meson.yaml15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/yaml/builtins/meson.yaml b/docs/yaml/builtins/meson.yaml
index 5ef445d84..966159cf4 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 `<builddir>/meson-logs/meson-log.txt`.
+
- name: build_root
returns: str
deprecated: 0.56.0