From 70317569c6dcd9809ed4a8c425777e653ec6ca08 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 1 May 2017 18:24:31 +0300 Subject: Add hxx extension for headers --- build2/cc/module.hxx | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 build2/cc/module.hxx (limited to 'build2/cc/module.hxx') diff --git a/build2/cc/module.hxx b/build2/cc/module.hxx new file mode 100644 index 0000000..643cf89 --- /dev/null +++ b/build2/cc/module.hxx @@ -0,0 +1,68 @@ +// file : build2/cc/module.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_CC_MODULE_HXX +#define BUILD2_CC_MODULE_HXX + +#include +#include + +#include +#include + +#include + +#include +#include +#include + +namespace build2 +{ + namespace cc + { + struct compiler_info; + + class config_module: public module_base, public virtual config_data + { + public: + explicit + config_module (config_data&& d) : config_data (move (d)) {} + + void + init (scope&, const location&, const variable_map&); + + // Translate the x.std value to the standard-selecting option if there + // is any. + // + virtual string + translate_std (const compiler_info&, scope&, const string&) const = 0; + + string tstd; + + private: + dir_paths + gcc_library_search_paths (process_path&, scope&) const; // gcc.cxx + + dir_paths + msvc_library_search_paths (process_path&, scope&) const; // msvc.cxx + }; + + 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)), + install (move (d), *this) {} + + void + init (scope&, const location&, const variable_map&); + }; + } +} + +#endif // BUILD2_CC_MODULE_HXX -- cgit v1.1