diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-06 10:44:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:42 +0200 |
commit | 03c02a746ceef003366d3fb928499c327e8da69a (patch) | |
tree | f2aad3a30b75835dcc26e6952724491d724b02c8 /build2/target.cxx | |
parent | 74d54ca37f8e16abb93b35617b6121ae19cc8028 (diff) |
Introduce target::task_count
Diffstat (limited to 'build2/target.cxx')
-rw-r--r-- | build2/target.cxx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/build2/target.cxx b/build2/target.cxx index b250597..f7387c7 100644 --- a/build2/target.cxx +++ b/build2/target.cxx @@ -31,8 +31,16 @@ namespace build2 // target_state // - static const char* const target_state_[] = { - "unknown", "unchanged", "postponed", "changed", "failed", "group"}; + static const char* const target_state_[] = + { + "unknown", + "unchanged", + "postponed", + "busy", + "changed", + "failed", + "group" + }; ostream& operator<< (ostream& os, target_state ts) @@ -99,7 +107,7 @@ namespace build2 action = a; recipe_ = move (r); - raw_state = target_state::unknown; + state_ = target_state::unknown; // If this is a noop recipe, then mark the target unchanged so that we // don't waste time executing the recipe. @@ -107,9 +115,15 @@ namespace build2 if (recipe_function** f = recipe_.target<recipe_function*> ()) { if (*f == &noop_action) - raw_state = target_state::unchanged; + state_ = target_state::unchanged; } + //@@ MT can this be a relaxed save? + // + task_count = state_ == target_state::unknown + ? count_unexecuted + : count_executed; + // This one is tricky: we don't want to reset the dependents count // if we are merely overriding with a "stronger" recipe. // |