aboutsummaryrefslogtreecommitdiff
path: root/build2/target.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-28 09:54:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-28 09:54:39 +0200
commiteace8edd98fe684e4631d9afb9be76ad3081f746 (patch)
treeec0e701629b16095a68564d662e7d159dfdf2ef9 /build2/target.ixx
parent5e417ea840d51c20295f8772e8b4655065071b7d (diff)
Fix bug in target_count logic
Diffstat (limited to 'build2/target.ixx')
-rw-r--r--build2/target.ixx9
1 files changed, 8 insertions, 1 deletions
diff --git a/build2/target.ixx b/build2/target.ixx
index 48036be..459265b 100644
--- a/build2/target.ixx
+++ b/build2/target.ixx
@@ -147,11 +147,18 @@ namespace build2
if (f != nullptr && *f == &noop_action)
state_ = target_state::unchanged;
else
+ {
// This gets tricky when we start considering overrides (which can
// only happen for noop recipes), direct execution, etc. So here seems
// like the best place to do this.
//
- target_count.fetch_add (1, memory_order_relaxed);
+ // We also ignore the group recipe since it is used for ad hoc
+ // groups (which are not executed). Plus, group action means real
+ // recipe is in the group so this also feels right conceptually.
+ //
+ if (f == nullptr || *f != &group_action)
+ target_count.fetch_add (1, memory_order_relaxed);
+ }
}
}