mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
Autogen: Restore mocs_compilation in OBJECT libraries
Since commit f65f20938c (Autogen: Avoid processing CSharp targets,
2020-11-12, v3.20.0-rc1~301^2) we collect all sources for a target
earlier than previously. Clear the sources cache so that it will be
re-computed later after AUTOGEN processing.
Fixes: #22085
This commit is contained in:
@@ -97,6 +97,11 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
|
||||
}
|
||||
std::set<std::string> const& languages =
|
||||
target->GetAllConfigCompileLanguages();
|
||||
// cmGeneratorTarget::GetAllConfigCompileLanguages caches the target's
|
||||
// sources. Clear it so that OBJECT library targets that are AUTOGEN
|
||||
// initialized after this target get their added mocs_compilation.cpp
|
||||
// source acknowledged by this target.
|
||||
target->ClearSourcesCache();
|
||||
if (languages.count("CSharp")) {
|
||||
// Don't process target if it's a CSharp target
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user