summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoMocUic.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-03-29 19:04:46 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-03-29 19:17:11 (GMT)
commit54ad3e4958952f5e0472a163f0c565592be412f9 (patch)
tree21a375e2a6cbd474d72c137bbfa67c83fda9d322 /Source/cmQtAutoMocUic.cxx
parentd212d91f14d2f2ed4f77ea7f190bbea2a4f6e302 (diff)
downloadCMake-54ad3e4958952f5e0472a163f0c565592be412f9.zip
CMake-54ad3e4958952f5e0472a163f0c565592be412f9.tar.gz
CMake-54ad3e4958952f5e0472a163f0c565592be412f9.tar.bz2
autogen: Don't include SKIP_AUTOMOC files in depfile
SKIP_AUTOMOC files should not be included in moc processing, which means they shouldn't be included in the depfile either. Remove them. Fixes: #21977
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r--Source/cmQtAutoMocUic.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 1e3bf06..535f786 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -2248,6 +2248,13 @@ void cmQtAutoMocUicT::JobDepFilesMergeT::Process()
std::for_each(this->MocEval().SourceMappings.begin(),
this->MocEval().SourceMappings.end(), processMappingEntry);
+ // Remove SKIP_AUTOMOC files
+ dependencies.erase(std::remove_if(dependencies.begin(), dependencies.end(),
+ [this](const std::string& dep) {
+ return this->MocConst().skipped(dep);
+ }),
+ dependencies.end());
+
// Remove duplicates to make the depfile smaller
std::sort(dependencies.begin(), dependencies.end());
dependencies.erase(std::unique(dependencies.begin(), dependencies.end()),