From 083743602a998c7618f65fc214bdbc1ed1915e55 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Aug 2017 15:18:25 +0200 Subject: Change cc.preprocessed to {c,cxx}.preprocessed --- build2/c/init.cxx | 3 ++- build2/cc/common.hxx | 3 ++- build2/cc/compile.cxx | 4 ++-- build2/cc/init.cxx | 11 ----------- build2/cxx/init.cxx | 12 +++++++++++- 5 files changed, 17 insertions(+), 16 deletions(-) (limited to 'build2') 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 ("c.preprocessed"), // See cxx.preprocessed. v.insert ("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 (t[c_preprocessed])) + if (const string* v = cast_null (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 ("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; } 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 ("cxx.preprocessed"), v.insert ("cxx.std", variable_visibility::project), -- cgit v1.1