From db2cf5ca0348788bfd8b3052c03279db1d971d2f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Jul 2022 09:14:38 +0200 Subject: Recognize special .for_install variable suffix in library user metadata --- libbuild2/variable.hxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libbuild2/variable.hxx') diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index 9c1e02c..6047bf3 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -1645,8 +1645,23 @@ namespace build2 pair insert (const variable&, bool typed = true, bool reset_extra = true); - // Note: does not deal with aliases. + // Note: the following functions do not deal with aliases. // + const_iterator + find (const variable& var) const + { + return const_iterator (m_.find (var), *this); + } + + const_iterator + find (const string& name) const + { + const variable* var (ctx != nullptr + ? ctx->var_pool.find (name) + : nullptr); + return var != nullptr ? find (*var) : end (); + } + bool erase (const variable&); -- cgit v1.1