diff options
author | Brad King <brad.king@kitware.com> | 2021-04-20 14:52:01 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-04-20 16:04:08 -0400 |
commit | b84f1e61595d4c9344a13fa4bf76d8a258757f1b (patch) | |
tree | 9ded0cd7dfe4f4bda7e97eae2af18fb6e7b3a905 /Source/cmQtAutoGenGlobalInitializer.cxx | |
parent | b0be93c5c73225517bba233f95f4775141ed3091 (diff) | |
download | cmake-b84f1e61595d4c9344a13fa4bf76d8a258757f1b.tar.gz |
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
Diffstat (limited to 'Source/cmQtAutoGenGlobalInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenGlobalInitializer.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx index f79ffd4a0f..f8d18f27a2 100644 --- a/Source/cmQtAutoGenGlobalInitializer.cxx +++ b/Source/cmQtAutoGenGlobalInitializer.cxx @@ -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; |