diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-05-01 18:24:31 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-05-01 19:30:26 +0300 |
commit | 70317569c6dcd9809ed4a8c425777e653ec6ca08 (patch) | |
tree | 07a538b296933e9e2a1f81088f8fcc8da3f749ad /build2/cc/compile | |
parent | cbec9ea8841c8a58b2d50bb628b28aea7a6fe179 (diff) |
Add hxx extension for headers
Diffstat (limited to 'build2/cc/compile')
-rw-r--r-- | build2/cc/compile | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/build2/cc/compile b/build2/cc/compile deleted file mode 100644 index 2986b7d..0000000 --- a/build2/cc/compile +++ /dev/null @@ -1,94 +0,0 @@ -// file : build2/cc/compile -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_CC_COMPILE -#define BUILD2_CC_COMPILE - -#include <butl/path-map> - -#include <build2/types> -#include <build2/utility> - -#include <build2/rule> - -#include <build2/cc/types> -#include <build2/cc/common> - -namespace build2 -{ - class depdb; - - namespace cc - { - class compile: public rule, virtual common - { - public: - compile (data&&); - - virtual match_result - match (action, target&, const string&) const override; - - virtual recipe - apply (action, target&) const override; - - target_state - perform_update (action, const target&) const; - - target_state - perform_clean (action, const target&) const; - - private: - void - append_lib_options (const scope&, - cstrings&, - const target&, - action, lorder) const; - - void - hash_lib_options (const scope&, - sha256&, - const target&, - action, lorder) const; - - // Mapping of include prefixes (e.g., foo in <foo/bar>) for auto- - // generated headers to directories where they will be generated. - // - // We are using a prefix map of directories (dir_path_map) instead of - // just a map in order to also cover sub-paths (e.g., <foo/more/bar> if - // we continue with the example). Specifically, we need to make sure we - // don't treat foobar as a sub-directory of foo. - // - // @@ The keys should be normalized. - // - using prefix_map = butl::dir_path_map<dir_path>; - - void - append_prefixes (prefix_map&, const target&, const variable&) const; - - void - append_lib_prefixes (const scope&, - prefix_map&, - target&, - action, lorder) const; - - prefix_map - build_prefix_map (const scope&, target&, action, lorder) const; - - // Reverse-lookup target type from extension. - // - const target_type* - map_extension (const scope&, const string&, const string&) const; - - // Header dependency injection. - // - void - inject (action, target&, lorder, const file&, depdb&) const; - - private: - const string rule_id; - }; - } -} - -#endif // BUILD2_CC_COMPILE |