From 614ac547aabbf9c6168e3ad42dad6ee022de2080 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Jan 2022 09:22:20 +0200 Subject: Add another overload of to_target(), declare in functions-name.hxx --- libbuild2/functions-name.hxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 libbuild2/functions-name.hxx (limited to 'libbuild2/functions-name.hxx') diff --git a/libbuild2/functions-name.hxx b/libbuild2/functions-name.hxx new file mode 100644 index 0000000..34fa4b8 --- /dev/null +++ b/libbuild2/functions-name.hxx @@ -0,0 +1,30 @@ +// file : libbuild2/functions-name.hxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#ifndef LIBBUILD2_FUNCTIONS_NAME_HXX +#define LIBBUILD2_FUNCTIONS_NAME_HXX + +#include +#include +#include + +#include + +namespace build2 +{ + // Helpers that may be useful to other functions that operate on target + // name. + + // Resolve the name to target issuing diagnostics and failing if not found. + // + LIBBUILD2_SYMEXPORT const target& + to_target (const scope&, name&&, name&& out); + + // As above but from the names vector which should contain a single name + // or an out-qualified name pair (asserted). + // + LIBBUILD2_SYMEXPORT const target& + to_target (const scope&, names&&); +} + +#endif // LIBBUILD2_FUNCTIONS_NAME_HXX -- cgit v1.1