aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/target.cxx
blob: 5fbf67df0f48c2ff830e4287517babbd6a334427 (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
// file      : build2/cc/target.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#include <build2/cc/target.hxx>

using namespace std;

namespace build2
{
  namespace cc
  {
    const target_type cc::static_type
    {
      "cc",
      &file::static_type,
      nullptr,
      nullptr,
      nullptr,
      nullptr,
      &target_search,
      false
    };

    extern const char ext_var[] = "extension";  // VC14 rejects constexpr.

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

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