diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-07-17 15:57:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-07-17 15:57:33 +0200 |
commit | ab4a9ef42e8f1070dcb5d783a5afccd2f685e86d (patch) | |
tree | 23c7c9420d313076814d91656b9717fc3dd60b68 /libbuild2/target.hxx | |
parent | b74a1e44cb4478356e4261ce0050de744e42d122 (diff) |
Add optimized derive_path_with_extension(), use in file_rule
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r-- | libbuild2/target.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx index 091b2d8..6022274 100644 --- a/libbuild2/target.hxx +++ b/libbuild2/target.hxx @@ -1577,6 +1577,15 @@ namespace build2 const char* name_suffix = nullptr, const char* extra_ext = nullptr); + // As above but with the already derived (by calling derive_extension()) + // extension. + // + const path_type& + derive_path_with_extension (const string& ext, + const char* name_prefix = nullptr, + const char* name_suffix = nullptr, + const char* extra_ext = nullptr); + // This version can be used to derive the path from another target's path // by adding another extension. // @@ -1585,6 +1594,14 @@ namespace build2 const char* default_ext = nullptr, const char* extra_ext = nullptr); + // As above but with the already derived (by calling derive_extension()) + // extension. + // + const path_type& + derive_path_with_extension (path_type base, + const string& ext, + const char* extra_ext = nullptr); + // As above but only derives (and returns) the extension (empty means no // extension used). // |