diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-02 15:18:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-02 15:18:25 +0200 |
commit | 083743602a998c7618f65fc214bdbc1ed1915e55 (patch) | |
tree | ec8a3441ad232e31591a8b3ec6ecbe459b495b9c /build2 | |
parent | d5ad01a48ac4c7c69995a58a3c198630df904419 (diff) |
Change cc.preprocessed to {c,cxx}.preprocessed
Diffstat (limited to 'build2')
-rw-r--r-- | build2/c/init.cxx | 3 | ||||
-rw-r--r-- | build2/cc/common.hxx | 3 | ||||
-rw-r--r-- | build2/cc/compile.cxx | 4 | ||||
-rw-r--r-- | build2/cc/init.cxx | 11 | ||||
-rw-r--r-- | build2/cxx/init.cxx | 12 |
5 files changed, 17 insertions, 16 deletions
diff --git a/build2/c/init.cxx b/build2/c/init.cxx index 159c0b8..0ca9aae 100644 --- a/build2/c/init.cxx +++ b/build2/c/init.cxx @@ -176,7 +176,8 @@ namespace build2 v["cc.system"], v["cc.module_name"], v["cc.reprocess"], - v["cc.preprocessed"], + + v.insert<string> ("c.preprocessed"), // See cxx.preprocessed. v.insert<string> ("c.std", variable_visibility::project), diff --git a/build2/cc/common.hxx b/build2/cc/common.hxx index 66c226c..05877ad 100644 --- a/build2/cc/common.hxx +++ b/build2/cc/common.hxx @@ -68,7 +68,8 @@ namespace build2 const variable& c_system; // cc.system const variable& c_module_name; // cc.module_name const variable& c_reprocess; // cc.reprocess - const variable& c_preprocessed; // cc.preprocessed + + const variable& x_preprocessed; // x.preprocessed const variable& x_std; diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 9f36e8b..1db827d 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -802,14 +802,14 @@ namespace build2 // This determines which of the following steps we perform and on // what source (original or preprocessed). // - if (const string* v = cast_null<string> (t[c_preprocessed])) + if (const string* v = cast_null<string> (t[x_preprocessed])) try { md.pp = to_preprocessed (*v); } catch (const invalid_argument& e) { - fail << "invalid " << c_preprocessed.name << " variable value " + fail << "invalid " << x_preprocessed.name << " variable value " << "for target " << t << ": " << e; } diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index 8dceda7..733280a 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -88,17 +88,6 @@ 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; } diff --git a/build2/cxx/init.cxx b/build2/cxx/init.cxx index 7f099cf..6c8cbad 100644 --- a/build2/cxx/init.cxx +++ b/build2/cxx/init.cxx @@ -355,7 +355,17 @@ namespace build2 v["cc.system"], v["cc.module_name"], v["cc.reprocess"], - v["cc.preprocessed"], + + // 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> ("cxx.preprocessed"), v.insert<string> ("cxx.std", variable_visibility::project), |