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.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/libbuild2/b-cmdline.cxx b/libbuild2/b-cmdline.cxx
index 77ad087..206c9de 100644
--- a/libbuild2/b-cmdline.cxx
+++ b/libbuild2/b-cmdline.cxx
@@ -421,6 +421,18 @@ namespace build2
if (ops.match_only () && ops.load_only ())
fail << "both --match-only and --load-only specified";
+
+ if (!ops.dump_specified ())
+ {
+ // Note: let's allow specifying --dump-format without --dump in case
+ // it comes from a default options file or some such.
+
+ if (ops.dump_target_specified ())
+ fail << "--dump-target requires --dump";
+
+ if (ops.dump_scope_specified ())
+ fail << "--dump-scope requires --dump";
+ }
}
catch (const cli::exception& e)
{