aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-12-12 12:24:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-12-12 12:24:41 +0200
commit4a4f6583b00a632977481c0f88b427912d5305a8 (patch)
tree4782ba62dee6d93f8d80e31732ae26f6e0816833 /libbuild2/cc
parentd27390e9935c94938af9e7068557d6f6ef9b07a9 (diff)
Generalize to_target() to be usable in other contextsHEADmaster
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/functions.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/cc/functions.cxx b/libbuild2/cc/functions.cxx
index 9d408af..0adcf5f 100644
--- a/libbuild2/cc/functions.cxx
+++ b/libbuild2/cc/functions.cxx
@@ -76,7 +76,9 @@ namespace build2
for (auto i (ts_ns.begin ()); i != ts_ns.end (); ++i)
{
name& n (*i), o;
- const target& t (to_target (*bs, move (n), move (n.pair ? *++i : o)));
+ const target& t (to_target (*bs,
+ move (n), move (n.pair ? *++i : o),
+ true /* in_recipe */));
if (!t.matched (a))
fail << t << " is not matched" <<
@@ -193,7 +195,9 @@ namespace build2
for (auto i (ts_ns.begin ()); i != ts_ns.end (); ++i)
{
name& n (*i), o;
- const target& t (to_target (*bs, move (n), move (n.pair ? *++i : o)));
+ const target& t (to_target (*bs,
+ move (n), move (n.pair ? *++i : o),
+ true /* in_recipe */));
bool la (false);
if (li