aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/functions-name.hxx
blob: 30fc8ad88eb000b9478b2e1a5f11c83f2fb72d1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// file      : libbuild2/functions-name.hxx -*- C++ -*-
// license   : MIT; see accompanying LICENSE file

#ifndef LIBBUILD2_FUNCTIONS_NAME_HXX
#define LIBBUILD2_FUNCTIONS_NAME_HXX

#include <libbuild2/types.hxx>
#include <libbuild2/forward.hxx>
#include <libbuild2/utility.hxx>

#include <libbuild2/export.hxx>

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,
             bool in_recipe,
             const location& = {});

  // 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&&, bool in_recipe, const location& = {});
}

#endif // LIBBUILD2_FUNCTIONS_NAME_HXX