mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 05:10:10 -05:00
Merge topic 'autogen-ui-header-depends'
9cebdbec77 AUTOUIC: Fix cyclic dependency between generated UI headers and timestamp
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6359
This commit is contained in:
@@ -2248,12 +2248,20 @@ 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 SKIP_AUTOMOC files.
|
||||
// Also remove AUTOUIC header files to avoid cyclic dependency.
|
||||
dependencies.erase(
|
||||
std::remove_if(dependencies.begin(), dependencies.end(),
|
||||
[this](const std::string& dep) {
|
||||
return this->MocConst().skipped(dep) ||
|
||||
std::any_of(
|
||||
this->UicEval().Includes.begin(),
|
||||
this->UicEval().Includes.end(),
|
||||
[&dep](MappingMapT::value_type const& mapping) {
|
||||
return dep == mapping.second->OutputFile;
|
||||
});
|
||||
}),
|
||||
dependencies.end());
|
||||
|
||||
// Remove duplicates to make the depfile smaller
|
||||
std::sort(dependencies.begin(), dependencies.end());
|
||||
|
||||
Reference in New Issue
Block a user