From a9f4f58f0c3837549c41479a177c864d3cfcf760 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 15 May 2020 08:20:34 -0400 Subject: cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache In commit 40aa6c059c (cmGeneratorTarget: Add method to collect all sources for all configs, 2017-04-10, v3.9.0-rc1~268^2~5) we forgot to update `ClearSourcesCache` to also clear `AllConfigSources`. This leads to subtle cases where code paths like PCH handling that add sources during generation break depending on ordering. Suggested-by: Christian Fersch Fixes: #20712, #20702 --- Source/cmGeneratorTarget.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 171c3ed..cde91c9 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -652,6 +652,7 @@ const char* cmGeneratorTarget::GetFileSuffixInternal( void cmGeneratorTarget::ClearSourcesCache() { + this->AllConfigSources.clear(); this->KindedSourcesMap.clear(); this->LinkImplementationLanguageIsContextDependent = true; this->Objects.clear(); -- cgit v0.12