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/types.hxx | |
parent | dcbd81ad1c303dd2b9ef54e8e7e485bb17c6de49 (diff) |
Add process_path_ex with program stable name and checksum
Diffstat (limited to 'libbuild2/types.hxx')
-rw-r--r-- | libbuild2/types.hxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libbuild2/types.hxx b/libbuild2/types.hxx index 6582c3a..65e0918 100644 --- a/libbuild2/types.hxx +++ b/libbuild2/types.hxx @@ -283,6 +283,30 @@ namespace build2 using butl::process_path; using butl::process_error; + // Extended process_path with additional information. + // + // See also {import,export}.metadata. + // + struct process_path_ex: process_path + { + optional<string> name; // Stable name for diagnostics. + optional<string> checksum; // Checksum for change tracking. + + using process_path::process_path; + + process_path_ex (const process_path& p, string n, optional<string> c = {}) + : process_path (p, false /* init */), + name (std::move (n)), + checksum (std::move (c)) {} + + process_path_ex (process_path&& p, string n, optional<string> c = {}) + : process_path (std::move (p)), + name (std::move (n)), + checksum (std::move (c)) {} + + process_path_ex () = default; + }; + // <libbutl/fdstream.mxx> // using butl::auto_fd; |