aboutsummaryrefslogtreecommitdiff
path: root/build2/cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-04-05 09:41:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-04-08 12:51:00 +0200
commit01d848149c22a69a62eada5fedc2406c54d95ba8 (patch)
tree66a3b59619f32f7f7244200f810f4d4cc9115ca5 /build2/cli
parent3392226a2248b5cd93a899afb986917ce9e7ad74 (diff)
Support for --dry-run|-n mode, perform update part
Diffstat (limited to 'build2/cli')
-rw-r--r--build2/cli/rule.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx
index cc3e5dd..2da5802 100644
--- a/build2/cli/rule.cxx
+++ b/build2/cli/rule.cxx
@@ -322,9 +322,11 @@ namespace build2
else if (verb)
text << "cli " << s;
- run (cli, args);
-
- dd.check_mtime (tp);
+ if (!dry_run)
+ {
+ run (cli, args);
+ dd.check_mtime (tp);
+ }
t.mtime (system_clock::now ());
return target_state::changed;