aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2019-05-26 15:13:21 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-05-28 20:26:54 +0300
commit12a82e763d43f6280572b3f04357f77e50304855 (patch)
treea11ae68d4bd92ca1b84fae7cbc04b0cc238c1bc8 /docs/markdown/Reference-manual.md
parent20eb948b974a96b3933d42db524fd584cb60c8b7 (diff)
downloadmeson-12a82e763d43f6280572b3f04357f77e50304855.zip
meson-12a82e763d43f6280572b3f04357f77e50304855.tar.gz
meson-12a82e763d43f6280572b3f04357f77e50304855.tar.bz2
interpreter: add fallback argument to subproject.get_variable()
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 9484c28..f59d627 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -2288,10 +2288,14 @@ opaque object representing it.
- `found()` *(added 0.48.0)* which returns whether the subproject was
successfully setup
-- `get_variable(name)` fetches the specified variable from inside the
+- `get_variable(name, fallback)` fetches the specified variable from inside the
subproject. This is useful to, for instance, get a [declared
dependency](#declare_dependency) from the [subproject](Subprojects.md).
+ If the variable does not exist, the variable `fallback` is returned.
+ If a fallback is not specified, then attempting to read a non-existing
+ variable will cause a fatal error.
+
### `run result` object
This object encapsulates the result of trying to compile and run a