diff options
author | L. E. Segovia <amy@amyspark.me> | 2022-10-08 21:14:37 +0000 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-02-20 11:05:06 -0500 |
commit | 088727164de8496c4bada040c2f4690e42f66b69 (patch) | |
tree | 26baacb88fd6761363be89bf2b0aa0ea78bfe628 /docs/yaml/builtins | |
parent | c2b0ca0fb9d7e6850874ae7c1c755982676f593d (diff) | |
download | meson-088727164de8496c4bada040c2f4690e42f66b69.zip meson-088727164de8496c4bada040c2f4690e42f66b69.tar.gz meson-088727164de8496c4bada040c2f4690e42f66b69.tar.bz2 |
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/builtins')
-rw-r--r-- | docs/yaml/builtins/meson.yaml | 15 |
1 files changed, 15 insertions, 0 deletions
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 `<builddir>/meson-logs/meson-log.txt`. + - name: build_root returns: str deprecated: 0.56.0 |