From c6265603e0e98c19f8d81c8edd5a34a550063c02 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 23 Nov 2016 09:53:18 +0200 Subject: Add support for config.cli=false (leave unconfigured) --- build2/config/utility.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'build2/config/utility.cxx') diff --git a/build2/config/utility.cxx b/build2/config/utility.cxx index 9131620..4c0e933 100644 --- a/build2/config/utility.cxx +++ b/build2/config/utility.cxx @@ -105,7 +105,7 @@ namespace build2 return l && !cast (l); } - void + bool unconfigured (scope& root, const string& ns, bool v) { // Note: not overridable. @@ -115,7 +115,15 @@ namespace build2 if (current_mif->id == configure_id) save_variable (root, var); - root.assign (var) = !v; + value& x (root.assign (var)); + + if (x.null || cast (x) != !v) + { + x = !v; + return true; + } + else + return false; } void -- cgit v1.1