aboutsummaryrefslogtreecommitdiff
path: root/build2/b-options.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-10 08:15:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:42 +0200
commitabccaf9596461215fce0e32322133fb6c39be44f (patch)
tree3fc16a6e6142d65e6b47ae686ab845cc164478cc /build2/b-options.cxx
parentbcb2a89e111a918a48a132a2a29e0c26d724591d (diff)
Implement parallel error propagation, keep_going mode
Keep going is the default but there is now the -s|--serial-stop that makes the driver run serially and stop at first error. Also fix some lockups, other minor improvements/features.
Diffstat (limited to 'build2/b-options.cxx')
-rw-r--r--build2/b-options.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/build2/b-options.cxx b/build2/b-options.cxx
index 37daab6..8a133dd 100644
--- a/build2/b-options.cxx
+++ b/build2/b-options.cxx
@@ -576,6 +576,7 @@ namespace build2
verbose_specified_ (false),
jobs_ (),
jobs_specified_ (false),
+ serial_stop_ (),
no_column_ (),
no_line_ (),
buildfile_ ("buildfile"),
@@ -696,6 +697,11 @@ namespace build2
<< " threads is used." << ::std::endl;
os << std::endl
+ << "\033[1m--serial-stop\033[0m|\033[1m-s\033[0m Run serially and stop at the first error. This mode is" << ::std::endl
+ << " useful to investigate build failured that are caused by" << ::std::endl
+ << " build system errors rather than compilation errors." << ::std::endl;
+
+ os << std::endl
<< "\033[1m--no-column\033[0m Don't print column numbers in diagnostics." << ::std::endl;
os << std::endl
@@ -777,6 +783,10 @@ namespace build2
_cli_options_map_["-j"] =
&::build2::cl::thunk< options, size_t, &options::jobs_,
&options::jobs_specified_ >;
+ _cli_options_map_["--serial-stop"] =
+ &::build2::cl::thunk< options, bool, &options::serial_stop_ >;
+ _cli_options_map_["-s"] =
+ &::build2::cl::thunk< options, bool, &options::serial_stop_ >;
_cli_options_map_["--no-column"] =
&::build2::cl::thunk< options, bool, &options::no_column_ >;
_cli_options_map_["--no-line"] =