From a4796d5b851dac4a546f89c282f65e320076eb10 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 27 Aug 2016 09:53:30 +0200 Subject: Clean up library export, make c and cxx modules project root only So now c and cxx modules can only be loaded in project root scope (normally root.build). Also, the c.std and cxx.std must now be set *before* loading the module to take effect. This means we won't be able to handle old buildfiles anymore but old versions of build2 should be able to handle new *.std placement. --- build2/pkgconfig/init.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build2/pkgconfig') diff --git a/build2/pkgconfig/init.cxx b/build2/pkgconfig/init.cxx index b7100e3..f82e710 100644 --- a/build2/pkgconfig/init.cxx +++ b/build2/pkgconfig/init.cxx @@ -30,8 +30,10 @@ namespace build2 tracer trace ("pkgconfig::config_init"); l5 ([&]{trace << "for " << bs.out_path ();}); + // We only support root loading (which means there can only be one). + // if (&rs != &bs) - fail (l) << "pkgconfig.config loaded for non-root scope"; + fail (l) << "pkgconfig.config module must be loaded in project root"; // Enter variables. // -- cgit v1.1