aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/operation.hxx
blob: ded3c8b79dc00ec7ab87222f5e29733c03c21b7f (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
41
42
43
44
45
46
47
48
49
50
51
// file      : libbuild2/config/operation.hxx -*- C++ -*-
// license   : MIT; see accompanying LICENSE file

#ifndef LIBBUILD2_CONFIG_OPERATION_HXX
#define LIBBUILD2_CONFIG_OPERATION_HXX

#include <set>

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

#include <libbuild2/operation.hxx>

namespace build2
{
  namespace config
  {
    class module;

    extern const meta_operation_info mo_configure;
    extern const meta_operation_info mo_disfigure;

    const string&
    preprocess_create (context&,
                       values&,
                       vector_view<opspec>&,
                       bool,
                       const location&);

    // Configuration exporting.
    //
    using project_set = std::set<const scope*>; // Pointers for comparison.

    // If inherit is false, then don't rely on inheritance from outer scopes
    // (used for config.config.save/$config.save()). In this case the already
    // configured project set can be empty.
    //
    void
    save_config (const scope& rs,
                 ostream&, const path_name&,
                 bool inherit,
                 module&,
                 const project_set&);

    // See config.config.hermetic.environment.
    //
    using hermetic_environment = vector<pair<string, optional<bool>>>;
  }
}

#endif // LIBBUILD2_CONFIG_OPERATION_HXX