aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/target.cxx
blob: 7fb99716da11ff72984b6f732a13367bdf902570 (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
60
61
62
63
64
65
66
67
// file      : build2/cxx/target.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#include <build2/cxx/target.hxx>

using namespace std;

namespace build2
{
  namespace cxx
  {
    extern const char ext_var[] = "extension";  // VC14 rejects constexpr.

    extern const char hxx_ext_def[] = "hxx";
    const target_type hxx::static_type
    {
      "hxx",
      &file::static_type,
      &target_factory<hxx>,
      &target_extension_var<ext_var, hxx_ext_def>,
      &target_pattern_var<ext_var, hxx_ext_def>,
      nullptr,
      &file_search,
      false
    };

    extern const char ixx_ext_def[] = "ixx";
    const target_type ixx::static_type
    {
      "ixx",
      &file::static_type,
      &target_factory<ixx>,
      &target_extension_var<ext_var, ixx_ext_def>,
      &target_pattern_var<ext_var, ixx_ext_def>,
      nullptr,
      &file_search,
      false
    };

    extern const char txx_ext_def[] = "txx";
    const target_type txx::static_type
    {
      "txx",
      &file::static_type,
      &target_factory<txx>,
      &target_extension_var<ext_var, txx_ext_def>,
      &target_pattern_var<ext_var, txx_ext_def>,
      nullptr,
      &file_search,
      false
    };

    extern const char cxx_ext_def[] = "cxx";
    const target_type cxx::static_type
    {
      "cxx",
      &cc::static_type,
      &target_factory<cxx>,
      &target_extension_var<ext_var, cxx_ext_def>,
      &target_pattern_var<ext_var, cxx_ext_def>,
      nullptr,
      &file_search,
      false
    };
  }
}