From 6a242a8050edd0a33ea0e770a6eca4823a98b8d1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 6 Jan 2022 06:59:31 +0200 Subject: Factor reusable code to target_key::effective_name() --- libbuild2/target-key.hxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2/target-key.hxx') diff --git a/libbuild2/target-key.hxx b/libbuild2/target-key.hxx index cd1ba83..c5690a9 100644 --- a/libbuild2/target-key.hxx +++ b/libbuild2/target-key.hxx @@ -31,6 +31,12 @@ namespace build2 bool is_a () const {return type->is_a ();} bool is_a (const target_type& tt) const {return type->is_a (tt);} + // Return an "effective" name, for example, for pattern matching, that + // includes the extension where appropriate. + // + const string& + effective_name (string& storage, bool force_ext = false) const; + // Append/return the target name or a pair of names if out-qualified. // // See also target::as_name() for the returned name stability guarantees. -- cgit v1.1