aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target-key.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-01-06 06:59:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-01-06 07:24:42 +0200
commit6a242a8050edd0a33ea0e770a6eca4823a98b8d1 (patch)
tree85be41222d59fc94448e9788f85304c3fc29712d /libbuild2/target-key.hxx
parentce684cd567eeb1dee211441a42689d299ee1da05 (diff)
Factor reusable code to target_key::effective_name()
Diffstat (limited to 'libbuild2/target-key.hxx')
-rw-r--r--libbuild2/target-key.hxx6
1 files changed, 6 insertions, 0 deletions
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<T> ();}
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.