From ba8e7dccf1257fbec9c7a2eac8729fcec684a9ea Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Feb 2024 05:48:25 +0200 Subject: Extend class prerequisite constructors --- libbuild2/prerequisite.hxx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'libbuild2/prerequisite.hxx') diff --git a/libbuild2/prerequisite.hxx b/libbuild2/prerequisite.hxx index 2f63056..9b9cccf 100644 --- a/libbuild2/prerequisite.hxx +++ b/libbuild2/prerequisite.hxx @@ -97,10 +97,26 @@ namespace build2 scope (s), vars (*this, false /* shared */) {} - // Make a prerequisite from a target. + prerequisite (const target_type_type& t, + dir_path d, + dir_path o, + string n, + optional e, + const scope_type& s) + : type (t), + dir (move (d)), + out (move (o)), + name (move (n)), + ext (move (e)), + scope (s), + vars (*this, false /* shared */) {} + + // Make a prerequisite from a target. If the second argument is true, + // assume the targets mutex is locked (see ext_locked()/key_locked() + // for background). // explicit - prerequisite (const target_type&); + prerequisite (const target_type&, bool locked = false); // Note that the returned key "tracks" the prerequisite; that is, any // updates to the prerequisite's members will be reflected in the key. -- cgit v1.1