aboutsummaryrefslogtreecommitdiff
path: root/build2/b-options.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-28 11:11:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-28 11:11:10 +0200
commit8901004f9e783fb3a30e2ddb1e69e8f8a7d085f5 (patch)
tree11d4b80a099d1dcea5404ec45c52201d9ec23b38 /build2/b-options.cxx
parent9190569b69e34468841b18b33c98f78e66a3d26e (diff)
Add --[no-]mtime-check options to control this behavior at runtime
By default the checks are enabled only for the staged toolchain.
Diffstat (limited to 'build2/b-options.cxx')
-rw-r--r--build2/b-options.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/build2/b-options.cxx b/build2/b-options.cxx
index 23ebae7..6409f3e 100644
--- a/build2/b-options.cxx
+++ b/build2/b-options.cxx
@@ -612,6 +612,8 @@ namespace build2
max_stack_ (),
max_stack_specified_ (false),
serial_stop_ (),
+ mtime_check_ (),
+ no_mtime_check_ (),
structured_result_ (),
match_only_ (),
no_column_ (),
@@ -793,6 +795,15 @@ namespace build2
<< " default concurrency)." << ::std::endl;
os << std::endl
+ << "\033[1m--mtime-check\033[0m Perform file modification time sanity checks. These checks" << ::std::endl
+ << " can be helpful in diagnosing spurious rebuilds and are" << ::std::endl
+ << " enabled by default for the staged version of the build" << ::std::endl
+ << " system. Use \033[1m--no-mtime-check\033[0m to disable." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--no-mtime-check\033[0m Don't perform file modification time sanity checks." << ::std::endl;
+
+ os << std::endl
<< "\033[1m--structured-result\033[0m Write the result of execution in a structured form. In" << ::std::endl
<< " this mode, instead of printing to \033[1mSTDERR\033[0m diagnostics" << ::std::endl
<< " messages about the outcome of executing actions on" << ::std::endl
@@ -926,6 +937,10 @@ namespace build2
&::build2::cl::thunk< options, bool, &options::serial_stop_ >;
_cli_options_map_["-s"] =
&::build2::cl::thunk< options, bool, &options::serial_stop_ >;
+ _cli_options_map_["--mtime-check"] =
+ &::build2::cl::thunk< options, bool, &options::mtime_check_ >;
+ _cli_options_map_["--no-mtime-check"] =
+ &::build2::cl::thunk< options, bool, &options::no_mtime_check_ >;
_cli_options_map_["--structured-result"] =
&::build2::cl::thunk< options, bool, &options::structured_result_ >;
_cli_options_map_["--match-only"] =