From 9fa5f73d00905568e8979d0c93ec4a8f645c81d5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Aug 2016 11:31:53 +0200 Subject: Implement support for C compilation We now have two new modules: cc (c-common) and c. --- build2/cc/target.cxx | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 build2/cc/target.cxx (limited to 'build2/cc/target.cxx') diff --git a/build2/cc/target.cxx b/build2/cc/target.cxx new file mode 100644 index 0000000..7c2bb24 --- /dev/null +++ b/build2/cc/target.cxx @@ -0,0 +1,39 @@ +// file : build2/cc/target.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#include + +using namespace std; + +namespace build2 +{ + namespace cc + { + extern const char ext_var[] = "extension"; // VC 19 rejects constexpr. + + extern const char h_ext_def[] = "h"; + const target_type h::static_type + { + "h", + &file::static_type, + &target_factory, + &target_extension_var, + nullptr, + &search_file, + false + }; + + extern const char c_ext_def[] = "c"; + const target_type c::static_type + { + "c", + &file::static_type, + &target_factory, + &target_extension_var, + nullptr, + &search_file, + false + }; + } +} -- cgit v1.1