aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/utility
blob: 307e1b4e34c50effc91686a05ca3925efa090204 (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
34
35
36
37
38
39
40
// file      : build2/cxx/utility -*- C++ -*-
// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#ifndef BUILD2_CXX_UTILITY
#define BUILD2_CXX_UTILITY

#include <build2/types>
#include <build2/utility>

#include <build2/target>

namespace build2
{
  namespace cxx
  {
    // T is either target or scope.
    //
    template <typename T>
    void
    append_std (cstrings&, T&, string& storage);

    template <typename T>
    void
    hash_std (sha256&, T&);

    // Append or hash library options from one of the cxx.export.* variables
    // recursively, prerequisite libraries first.
    //
    void
    append_lib_options (cstrings&, target&, const char* variable);

    void
    hash_lib_options (sha256&, target&, const char* variable);
  }
}

#include <build2/cxx/utility.txx>

#endif // BUILD2_CXX_UTILITY