diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-02 07:35:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-02 07:35:44 +0200 |
commit | a3ed04f37c47e2eaa83d87dda2ec4ab060a7a2d0 (patch) | |
tree | 1ca68321bc7203cfef635dab6820f35435279ee0 /libbuild2/variable.ixx | |
parent | dcbd81ad1c303dd2b9ef54e8e7e485bb17c6de49 (diff) |
Add process_path_ex with program stable name and checksum
Diffstat (limited to 'libbuild2/variable.ixx')
-rw-r--r-- | libbuild2/variable.ixx | 20 |
1 files changed, 19 insertions, 1 deletions
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<process_path>:: 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<process_path_ex>:: + 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<process_path_ex> () = move (x); + else + new (&v.data_) process_path_ex (move (x)); + } + // target_triplet value // inline void value_traits<target_triplet>:: |