aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/common.cxx4
-rw-r--r--libbuild2/cc/functions.cxx9
2 files changed, 13 insertions, 0 deletions
diff --git a/libbuild2/cc/common.cxx b/libbuild2/cc/common.cxx
index 09a1752..ccb678c 100644
--- a/libbuild2/cc/common.cxx
+++ b/libbuild2/cc/common.cxx
@@ -320,6 +320,10 @@ namespace build2
if (pt.adhoc || pt == nullptr)
continue;
+ if (marked (pt))
+ fail << "implicit dependency cycle detected involving library "
+ << l;
+
bool la;
const file* f;
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