From ab4a9ef42e8f1070dcb5d783a5afccd2f685e86d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 17 Jul 2020 15:57:33 +0200 Subject: Add optimized derive_path_with_extension(), use in file_rule --- libbuild2/target.hxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libbuild2/target.hxx') 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). // -- cgit v1.1