diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-07-05 09:14:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-07-05 09:14:38 +0200 |
commit | db2cf5ca0348788bfd8b3052c03279db1d971d2f (patch) | |
tree | 3987e4b9f46ed0a0b8d7c4c90dc6749b4e14740b /libbuild2/variable.hxx | |
parent | 651caf2377c5b7c144386c6a479c98d1cb98d417 (diff) |
Recognize special .for_install variable suffix in library user metadata
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r-- | libbuild2/variable.hxx | 17 |
1 files changed, 16 insertions, 1 deletions
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<value&, bool> 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&); |