From 90d37f3fe126fa7b3d97fb071f537f910bd4a7fa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 3 Feb 2021 09:45:46 +0200 Subject: Propagate relevant options/prerequisites to header unit sidebuilds --- libbuild2/scope.hxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'libbuild2/scope.hxx') diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx index bd82853..bc04bae 100644 --- a/libbuild2/scope.hxx +++ b/libbuild2/scope.hxx @@ -139,12 +139,20 @@ namespace build2 return lookup (var, &tt, &tn).first; } + lookup_type + lookup (const variable& var, + const target_type& tt, const string& tn, + const target_type& gt, const string& gn) const + { + return lookup (var, &tt, &tn, >, &gn).first; + } + pair lookup (const variable& var, - const target_type* tt = nullptr, - const string* tn = nullptr) const + const target_type* tt = nullptr, const string* tn = nullptr, + const target_type* gt = nullptr, const string* gn = nullptr) const { - auto p (lookup_original (var, tt, tn)); + auto p (lookup_original (var, tt, tn, gt, gn)); return var.overrides == nullptr ? p : lookup_override (var, move (p)); } -- cgit v1.1