From 5f924ea1926fe17acf699a43713b7f5881e9d30d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 26 Jun 2016 17:05:07 +0200 Subject: Add support for passing configuration hints via module init() --- build2/config/module | 9 +++++++-- build2/config/module.cxx | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'build2/config') diff --git a/build2/config/module b/build2/config/module index 6012442..912ab57 100644 --- a/build2/config/module +++ b/build2/config/module @@ -32,8 +32,13 @@ namespace build2 config_boot (scope&, const location&, unique_ptr&); extern "C" bool - config_init ( - scope&, scope&, const location&, unique_ptr&, bool, bool); + config_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); } } diff --git a/build2/config/module.cxx b/build2/config/module.cxx index 16eabe9..70301c5 100644 --- a/build2/config/module.cxx +++ b/build2/config/module.cxx @@ -59,7 +59,8 @@ namespace build2 const location& l, unique_ptr& mod, bool first, - bool) + bool, + const variable_map& config_hints) { tracer trace ("config::init"); @@ -71,6 +72,8 @@ namespace build2 l5 ([&]{trace << "for " << root.out_path ();}); + assert (config_hints.empty ()); // We don't known any hints. + // Only create the module if we are configuring. // if (current_mif->id == configure_id) -- cgit v1.1