diff options
Diffstat (limited to 'docs/yaml/objects/subproject.yaml')
| -rw-r--r-- | docs/yaml/objects/subproject.yaml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/yaml/objects/subproject.yaml b/docs/yaml/objects/subproject.yaml new file mode 100644 index 000000000..d84e3f066 --- /dev/null +++ b/docs/yaml/objects/subproject.yaml @@ -0,0 +1,30 @@ +name: subproject +long_name: Subproject object +description: This object is returned by [[subproject]] and is an opaque object representing it. + +methods: +- name: found + returns: bool + since: 0.48.0 + description: Returns whether the subproject was successfully setup. + +- name: get_variable + returns: any + description: | + fetches the specified variable from inside the subproject. + This is useful to, for instance, get a + [[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. + + posargs: + var_name: + type: str + description: The name of the variable to query + + optargs: + fallback: + type: any + description: The fallback value to return if `var_name` does not exist. |
