aboutsummaryrefslogtreecommitdiff
path: root/build2/depdb.ixx
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/depdb.ixx
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/depdb.ixx')
-rw-r--r--build2/depdb.ixx23
1 files changed, 19 insertions, 4 deletions
diff --git a/build2/depdb.ixx b/build2/depdb.ixx
index 46fdb28..ecaf102 100644
--- a/build2/depdb.ixx
+++ b/build2/depdb.ixx
@@ -13,15 +13,30 @@ namespace build2
os_.~ofdstream ();
}
-#ifndef BUILD2_MTIME_CHECK
+ inline bool depdb::
+ mtime_check ()
+ {
+ // Note: options were validated in main().
+ //
+ return (ops. mtime_check () ? true :
+ ops.no_mtime_check () ? false :
+ BUILD2_MTIME_CHECK);
+ }
+
inline void depdb::
- verify (const path_type&, timestamp)
+ check_mtime (const path_type& t, timestamp e)
{
+ if (state_ == state::write && mtime_check ())
+ check_mtime_ (t, e);
}
inline void depdb::
- verify (timestamp, const path_type&, const path_type&, timestamp)
+ check_mtime (timestamp s,
+ const path_type& d,
+ const path_type& t,
+ timestamp e)
{
+ if (mtime_check ())
+ check_mtime_ (s, d, t, e);
}
-#endif
}