aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/prerequisite.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-02-12 05:48:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-02-12 05:48:25 +0200
commitba8e7dccf1257fbec9c7a2eac8729fcec684a9ea (patch)
tree948b21f8e6c79f0a3ef919c67b7a88b67f26e23b /libbuild2/prerequisite.hxx
parent7bbe8042dbbea81c713576e1ce69d00bbba5d4b6 (diff)
Extend class prerequisite constructors
Diffstat (limited to 'libbuild2/prerequisite.hxx')
-rw-r--r--libbuild2/prerequisite.hxx20
1 files changed, 18 insertions, 2 deletions
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<string> 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.