Merge topic 'custom-command-ninja-deps'

3c8d1eef72 Ninja: depfile: keep rules without dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8984
This commit is contained in:
Brad King 2023-11-20 14:01:33 +00:00 committed by Kitware Robot
commit b13d2e3321

View File

@ -144,8 +144,8 @@ void cmGccDepfileLexerHelper::sanitizeContent()
++rit;
}
}
// Remove the entry if rules are empty or do not have any paths
if (it->rules.empty() || it->paths.empty()) {
// Remove the entry if rules are empty
if (it->rules.empty()) {
it = this->Content.erase(it);
} else {
++it;