summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-21 14:42:08 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-21 14:42:16 (GMT)
commitb0f203f133ab3f4af1a00ad556de34c9b0db8c91 (patch)
tree9ded0cd7dfe4f4bda7e97eae2af18fb6e7b3a905 /Source
parentb0be93c5c73225517bba233f95f4775141ed3091 (diff)
parentb84f1e61595d4c9344a13fa4bf76d8a258757f1b (diff)
downloadCMake-b0f203f133ab3f4af1a00ad556de34c9b0db8c91.zip
CMake-b0f203f133ab3f4af1a00ad556de34c9b0db8c91.tar.gz
CMake-b0f203f133ab3f4af1a00ad556de34c9b0db8c91.tar.bz2
Merge topic 'autogen-clear-early-source-cache' into release-3.20
b84f1e6159 Autogen: Restore mocs_compilation in OBJECT libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6024
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx
index f79ffd4..f8d18f2 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;