aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/module
blob: bed767386d833fb6b023abf2680fd1571986c59f (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
52
53
54
55
56
57
58
59
// file      : build2/cc/module -*- C++ -*-
// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#ifndef BUILD2_CC_MODULE
#define BUILD2_CC_MODULE

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

#include <build2/module>
#include <build2/variable>

#include <build2/cc/common>

#include <build2/cc/compile>
#include <build2/cc/link>
#include <build2/cc/install>

namespace build2
{
  namespace cc
  {
    class config_module: public module_base, public virtual config_data
    {
    public:
      explicit
      config_module (config_data&& d) : config_data (move (d)) {}

      void
      init (scope&,
            scope&,
            const location&,
            bool first,
            const variable_map&);
    };

    class module: public module_base, protected virtual common,
                  link, compile, install
    {
    public:
      explicit
      module (data&& d)
          : common (move (d)),
            link (move (d)),
            compile (move (d), *this),
            install (move (d), *this) {}

      void
      init (scope&,
            scope&,
            const location&,
            bool first,
            const variable_map&);
    };
  }
}

#endif // BUILD2_CC_MODULE