diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-29 14:05:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-29 14:05:21 +0200 |
commit | f69a53d0b83f6b6448aeacb98442b90e938696f3 (patch) | |
tree | edfd544ed849eacbdc2d23f16aef6e27f34ad13c /build2/cc/compile.hxx | |
parent | d2d15fd4f70da8959d8222229c4e12c85ead8db3 (diff) |
Add ability to limit amount of preprocessing done on source
The cc.preprocessed variable can be 'none' (not preprocessed), 'includes' (no
depends on preprocessor, e.g., #ifdef, etc), and 'all' (the source is fully
preprocessed). Note that for 'all' the source can still contain comments and
line continuations.
Diffstat (limited to 'build2/cc/compile.hxx')
-rw-r--r-- | build2/cc/compile.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/build2/cc/compile.hxx b/build2/cc/compile.hxx index f8e6bab..2b6fb2e 100644 --- a/build2/cc/compile.hxx +++ b/build2/cc/compile.hxx @@ -22,6 +22,11 @@ namespace build2 namespace cc { + // The order is arranged so that their integral values indicate whether + // one is a "stronger" than another. + // + enum class preprocessed: uint8_t {none, includes, modules, all}; + class compile: public rule, virtual common { public: @@ -87,7 +92,7 @@ namespace build2 depdb&, bool&) const; void extract_modules (action, file&, lorder, - const file&, auto_rmfile&, + const file&, auto_rmfile&, preprocessed, depdb&, bool&) const; private: |