diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-02-08 14:32:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-02-09 10:19:46 +0200 |
commit | 9689e2bafcf9af511df1f357aa3f6ec8545d0010 (patch) | |
tree | 0d7c28e6ec9e900b90302e0b6754306f3701865c /libbuild2/target.ixx | |
parent | 1cccd7acfa672397b7d5d1a759f803bb0f748224 (diff) |
Don't skip empty see-through target groups
Diffstat (limited to 'libbuild2/target.ixx')
-rw-r--r-- | libbuild2/target.ixx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index cfc3847..fddf1b2 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -456,6 +456,25 @@ namespace build2 } template <typename T> + inline void prerequisite_members_range<T>::iterator:: + switch_mode () + { + g_ = resolve_members (*i_); + + if (g_.members != nullptr) + { + // See empty see through groups as groups. + // + for (j_ = 1; j_ <= g_.count && g_.members[j_ - 1] == nullptr; ++j_) ; + + if (j_ > g_.count) + g_.count = 0; + } + else + assert (r_->mode_ != members_mode::always); // Group can't be resolved. + } + + template <typename T> inline auto prerequisite_members_range<T>::iterator:: operator++ () -> iterator& { |