From a3ed04f37c47e2eaa83d87dda2ec4ab060a7a2d0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 2 Jun 2020 07:35:44 +0200 Subject: Add process_path_ex with program stable name and checksum --- libbuild2/variable.ixx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'libbuild2/variable.ixx') diff --git a/libbuild2/variable.ixx b/libbuild2/variable.ixx index 50cce78..84bf20c 100644 --- a/libbuild2/variable.ixx +++ b/libbuild2/variable.ixx @@ -614,7 +614,7 @@ namespace build2 inline void value_traits:: assign (value& v, process_path&& x) { - // Convert the value to its "self-sufficient" form. + // Convert the value to its "self-sufficient" form (see also below). // if (x.recall.empty ()) x.recall = path (x.initial); @@ -638,6 +638,24 @@ namespace build2 return r; } + // process_path_ex value + // + inline void value_traits:: + assign (value& v, process_path_ex&& x) + { + // Convert the value to its "self-sufficient" form (see also above). + // + if (x.recall.empty ()) + x.recall = path (x.initial); + + x.initial = x.recall.string ().c_str (); + + if (v) + v.as () = move (x); + else + new (&v.data_) process_path_ex (move (x)); + } + // target_triplet value // inline void value_traits:: -- cgit v1.1