aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/functions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-02-15 15:59:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-02-15 15:59:22 +0200
commit743273bd381a132c272226af00381da0494e8920 (patch)
treeb43f53fa0a1b40c1aa38238e42bbe0e0515afe13 /libbuild2/cc/functions.cxx
parent84c947319c7300bab12f800088d6b92245388f20 (diff)
Diagnose various misuses of library metadata protocol
Diffstat (limited to 'libbuild2/cc/functions.cxx')
-rw-r--r--libbuild2/cc/functions.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbuild2/cc/functions.cxx b/libbuild2/cc/functions.cxx
index e05c707..8a48e66 100644
--- a/libbuild2/cc/functions.cxx
+++ b/libbuild2/cc/functions.cxx
@@ -74,6 +74,11 @@ namespace build2
{
name& n (*i), o;
const target& t (to_target (*bs, move (n), move (n.pair ? *++i : o)));
+
+ if (!t.matched (a))
+ fail << t << " is not matched" <<
+ info << "make sure this target is listed as prerequisite";
+
d.f (r, vs, *m, *bs, a, t);
}
@@ -174,6 +179,10 @@ namespace build2
(la = (f = t.is_a<liba> ())) ||
( (f = t.is_a<libs> ())))
{
+ if (!t.matched (a))
+ fail << t << " is not matched" <<
+ info << "make sure this target is listed as prerequisite";
+
d.f (ls, r, vs, *m, *bs, a, *f, la, li);
}
else