aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/b-cmdline.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/b-cmdline.cxx')
-rw-r--r--libbuild2/b-cmdline.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/libbuild2/b-cmdline.cxx b/libbuild2/b-cmdline.cxx
index 8d78036..b7d0726 100644
--- a/libbuild2/b-cmdline.cxx
+++ b/libbuild2/b-cmdline.cxx
@@ -286,8 +286,25 @@ namespace build2
{
optional<dir_path> extra;
if (ops.default_options_specified ())
+ {
extra = ops.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;
+ }
+ }
+
// Load default options files.
//
default_options<b_options> def_ops (