diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-19 23:28:03 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-21 21:16:24 +0300 |
commit | ed6432add13b0ee9c35a9bbd261e068969f0462d (patch) | |
tree | e73ec22acf06cf2feffc31b2b8bd3ef2a86ead95 /build2/b.cxx | |
parent | 91734f1772aeca9795040d2db03b4f29051fa922 (diff) |
Make testscripts to ignore user's default options files
Diffstat (limited to 'build2/b.cxx')
-rw-r--r-- | build2/b.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
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<dir_path> extra; + if (ops.default_options_specified ()) + extra = ops.default_options (); + ops = merge_default_options ( load_default_options<options, cl::argv_file_scanner, cl::unknown_mode> ( 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); } |