From ed6432add13b0ee9c35a9bbd261e068969f0462d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 19 Aug 2019 23:28:03 +0300 Subject: Make testscripts to ignore user's default options files --- build2/b.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'build2/b.cxx') diff --git a/build2/b.cxx b/build2/b.cxx index e7f11f2..f359dbc 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -367,18 +367,29 @@ main (int argc, char* argv[]) if (!ops.no_default_options ()) // Command line option. try { + optional extra; + if (ops.default_options_specified ()) + extra = ops.default_options (); + ops = merge_default_options ( load_default_options ( nullopt /* sys_dir */, path::home_directory (), // The home variable is not assigned yet. + extra, default_options_files {{path ("b.options")}, - nullopt /* start_dir */}, - [&trace, &verbosity] (const path& f, bool remote) + nullopt /* start */}, + [&trace, &verbosity] (const path& f, bool r, bool o) { if (verbosity () >= 3) - trace << "loading " << (remote ? "remote " : "local ") << f; + { + if (o) + trace << "treating " << f << " as " + << (r ? "remote" : "local"); + else + trace << "loading " << (r ? "remote " : "local ") << f; + } }), ops); } -- cgit v1.1