mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
Ninja: depfile: keep rules without dependencies
To avoid repeated executions of custom command actions, depfile file with rules without dependencies must be preserved. Fixes: #25428
This commit is contained in:
@@ -145,8 +145,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;
|
||||
|
||||
Reference in New Issue
Block a user