summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-11-18 14:40:41 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-20 13:17:48 (GMT)
commit3c8d1eef72832a86bd85b7cb2629b672e174e651 (patch)
tree442b7b2764815050fe7aae773f2e39c9ccc775b3 /Source
parent9cfff766eb26ab8b29aa509e42d6b367dd00c7b7 (diff)
downloadCMake-3c8d1eef72832a86bd85b7cb2629b672e174e651.zip
CMake-3c8d1eef72832a86bd85b7cb2629b672e174e651.tar.gz
CMake-3c8d1eef72832a86bd85b7cb2629b672e174e651.tar.bz2
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
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGccDepfileLexerHelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGccDepfileLexerHelper.cxx b/Source/cmGccDepfileLexerHelper.cxx
index 87377de..ae8892a 100644
--- a/Source/cmGccDepfileLexerHelper.cxx
+++ b/Source/cmGccDepfileLexerHelper.cxx
@@ -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;