diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-09 11:31:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-12 17:04:22 +0200 |
commit | 9fa5f73d00905568e8979d0c93ec4a8f645c81d5 (patch) | |
tree | f2bf937fa256c0ef2c9bbe05d3655d1985719405 /build2/cc/module | |
parent | a1b2319ff2ddc8a6f139ee364cabe236ca62e23e (diff) |
Implement support for C compilation
We now have two new modules: cc (c-common) and c.
Diffstat (limited to 'build2/cc/module')
-rw-r--r-- | build2/cc/module | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/build2/cc/module b/build2/cc/module new file mode 100644 index 0000000..bed7673 --- /dev/null +++ b/build2/cc/module @@ -0,0 +1,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 |