From 848e360450c397f1dcfc4d8d3f614df05806699a Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 17 Mar 2021 13:27:31 -0400 Subject: interpreter: Add varname as positional arg in dep.get_variable() --- docs/markdown/snippets/dep_get_variable.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/markdown/snippets/dep_get_variable.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/dep_get_variable.md b/docs/markdown/snippets/dep_get_variable.md new file mode 100644 index 0000000..54373d9 --- /dev/null +++ b/docs/markdown/snippets/dep_get_variable.md @@ -0,0 +1,8 @@ +## `dep.get_variable(varname)` + +`dep.get_variable()` now has `varname` as first positional argument. +It is used as default value for `cmake`, `pkgconfig`, `configtool` and `internal` +keyword arguments. It is useful in the common case where `pkgconfig` and `internal` +use the same variable name, in which case it's easier to write `dep.get_variable('foo')` +instead of `dep.get_variable(pkgconfig: 'foo', internal: 'foo')`. + -- cgit v1.1