aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-29 14:05:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-29 14:05:21 +0200
commitf69a53d0b83f6b6448aeacb98442b90e938696f3 (patch)
treeedfd544ed849eacbdc2d23f16aef6e27f34ad13c /build2/cc/init.cxx
parentd2d15fd4f70da8959d8222229c4e12c85ead8db3 (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/init.cxx')
-rw-r--r--build2/cc/init.cxx11
1 files changed, 11 insertions, 0 deletions
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<bool> ("config.cc.reprocess", true);
v.insert<bool> ("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<string> ("cc.preprocessed");
+
return true;
}