diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-01-15 08:49:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-01-15 08:53:30 +0200 |
commit | 8a0ebb2b607c92b8c1bdab7e525da2b711b31565 (patch) | |
tree | 4556f7d33dd9fe22fe299b5466b3cb6a930ddfe1 /libbuild2/scope.cxx | |
parent | 05ee8c20d83c2f108aa71a65e19b7adff8ff9aa0 (diff) |
Automatically alias unknown target types of imported targets
Diffstat (limited to 'libbuild2/scope.cxx')
-rw-r--r-- | libbuild2/scope.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libbuild2/scope.cxx b/libbuild2/scope.cxx index 4c9f301..2b47dd0 100644 --- a/libbuild2/scope.cxx +++ b/libbuild2/scope.cxx @@ -792,9 +792,11 @@ namespace build2 } pair<const target_type&, optional<string>> scope:: - find_target_type (name& n, name& o, const location& loc) const + find_target_type (name& n, name& o, + const location& loc, + const target_type* tt) const { - auto r (find_target_type (n, loc)); + auto r (find_target_type (n, loc, tt)); if (r.first == nullptr) fail (loc) << "unknown target type " << n.type << " in " << n; @@ -878,14 +880,16 @@ namespace build2 } target_key scope:: - find_target_key (names& ns, const location& loc) const + find_target_key (names& ns, + const location& loc, + const target_type* tt) const { if (size_t n = ns.size ()) { if (n == (ns[0].pair ? 2 : 1)) { name dummy; - return find_target_key (ns[0], n == 1 ? dummy : ns[1], loc); + return find_target_key (ns[0], n == 1 ? dummy : ns[1], loc, tt); } } |