From dfb51bc816cde2cb345f8a0300205e6ac95a2065 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Mar 2020 15:30:08 +0200 Subject: Switch to project variable visibility by default --- libbuild2/cxx/init.cxx | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'libbuild2/cxx') diff --git a/libbuild2/cxx/init.cxx b/libbuild2/cxx/init.cxx index 4c4f6ad..1d8421c 100644 --- a/libbuild2/cxx/init.cxx +++ b/libbuild2/cxx/init.cxx @@ -91,13 +91,13 @@ namespace build2 // Feature flags. // - auto enter = [&rs] (const char* v) -> const variable& - { - return rs.var_pool ().insert (v, variable_visibility::project); - }; + auto& vp (rs.var_pool ()); - //bool concepts (false); auto& v_c (enter ("cxx.features.concepts")); - bool modules (false); auto& v_m (enter ("cxx.features.modules")); + //bool concepts (false); + //auto& v_c (vp.insert ("cxx.features.concepts")); + + bool modules (false); + auto& v_m (vp.insert ("cxx.features.modules")); // NOTE: see also module sidebuild subproject if changing anything about // modules here. @@ -403,20 +403,18 @@ namespace build2 hinters, - // Note: some overridable, some not. - // // NOTE: remember to update documentation if changing anything here. // - vp.insert ("config.cxx", true), - vp.insert ("config.cxx.id", true), - vp.insert ("config.cxx.version", true), - vp.insert ("config.cxx.target", true), - vp.insert ("config.cxx.std", true), - vp.insert ("config.cxx.poptions", true), - vp.insert ("config.cxx.coptions", true), - vp.insert ("config.cxx.loptions", true), - vp.insert ("config.cxx.aoptions", true), - vp.insert ("config.cxx.libs", true), + vp.insert ("config.cxx"), + vp.insert ("config.cxx.id"), + vp.insert ("config.cxx.version"), + vp.insert ("config.cxx.target"), + vp.insert ("config.cxx.std"), + vp.insert ("config.cxx.poptions"), + vp.insert ("config.cxx.coptions"), + vp.insert ("config.cxx.loptions"), + vp.insert ("config.cxx.aoptions"), + vp.insert ("config.cxx.libs"), // List of translatable headers. Inclusions of such headers are // translated to the corresponding header unit imports. @@ -427,14 +425,14 @@ namespace build2 // opposed to -I) header search paths. Note also that all entries must // be specified before loading the cxx module. // - &vp.insert ("config.cxx.translatable_headers", true), + &vp.insert ("config.cxx.translatable_headers"), vp.insert ("cxx.path"), vp.insert ("cxx.mode"), vp.insert ("cxx.sys_lib_dirs"), vp.insert ("cxx.sys_inc_dirs"), - vp.insert ("cxx.std", variable_visibility::project), + vp.insert ("cxx.std"), vp.insert ("cxx.poptions"), vp.insert ("cxx.coptions"), @@ -602,8 +600,7 @@ namespace build2 bool symexport (false); if (modules) { - auto& var (vp.insert ("cxx.features.symexport", - variable_visibility::project)); + auto& var (vp.insert ("cxx.features.symexport")); symexport = cast_false (rs[var]); cm.x_symexport = &var; } -- cgit v1.1