diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-23 12:45:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-23 12:45:22 +0200 |
commit | 0ca011d1220207b3c1cba92791413f113ec66329 (patch) | |
tree | 855224e36408fc80ec7d47741b59ce4524402240 /build2/b.cxx | |
parent | 20f97f06ce54c31e32cf58cfd1b7cae3617c1661 (diff) |
keep_going
Diffstat (limited to 'build2/b.cxx')
-rw-r--r-- | build2/b.cxx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/build2/b.cxx b/build2/b.cxx index af51a31..0f1009a 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -478,7 +478,7 @@ main (int argc, char* argv[]) // init (&::terminate, argv[0], - !ops.serial_stop (), ops.dry_run (), + ops.dry_run (), (ops.mtime_check () ? optional<bool> (true) : ops.no_mtime_check () ? optional<bool> (false) : nullopt), (ops.config_sub_specified () @@ -493,7 +493,7 @@ main (int argc, char* argv[]) // current and child processes unless we are in the stop mode. Failed that // we may have multiple dialog boxes popping up. // - if (keep_going) + if (!ops.serial_stop ()) SetErrorMode (SetErrorMode (0) | // Returns the current mode. SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); #endif @@ -615,7 +615,16 @@ main (int argc, char* argv[]) // the global scope being setup. We reset it for every meta-operation (see // below). // - unique_ptr<context> ctx (new context (sched, cmd_vars)); + unique_ptr<context> ctx; + auto new_context = [&ctx, &cmd_vars] + { + ctx = nullptr; // Free first. + ctx.reset (new context (sched, + cmd_vars, + !ops.serial_stop () /* keep_going */)); + }; + + new_context (); // Parse the buildspec. // @@ -757,8 +766,7 @@ main (int argc, char* argv[]) // if (dirty) { - ctx = nullptr; - ctx.reset (new context (sched, cmd_vars)); + new_context (); dirty = false; } |