From f69a53d0b83f6b6448aeacb98442b90e938696f3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 29 May 2017 14:05:21 +0200 Subject: 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. --- build2/cc/init.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build2/cc/init.cxx') diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index a5fcf83..f845712 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -83,6 +83,17 @@ namespace build2 v.insert ("config.cc.reprocess", true); v.insert ("cc.reprocess"); + // Ability to indicate that source is already (partially) preprocessed. + // Valid values are 'none' (not preprocessed), 'includes' (no #include + // directives in source), 'modules' (as above plus no module declaration + // 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. Note also that for some compilers + // (e.g., VC) there is no way to signal that the source is already + // preprocessed. + // + v.insert ("cc.preprocessed"); + return true; } -- cgit v1.1