diff options
-rw-r--r-- | bdep/bdep.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bdep/bdep.cxx b/bdep/bdep.cxx index 73c1302..02912d0 100644 --- a/bdep/bdep.cxx +++ b/bdep/bdep.cxx @@ -258,8 +258,25 @@ init (const common_options& co, { optional<dir_path> extra; if (o.default_options_specified ()) + { extra = o.default_options (); + // Note that load_default_options() expects absolute and normalized + // directory. + // + try + { + if (extra->relative ()) + extra->complete (); + + extra->normalize (); + } + catch (const invalid_path& e) + { + fail << "invalid --default-options value " << e.path; + } + } + default_options<O> dos ( load_default_options<O, cli::argv_file_scanner, cli::unknown_mode> ( nullopt /* sys_dir */, |