summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-24 14:11:04 -0500
committerBrad King <brad.king@kitware.com>2022-01-29 06:48:11 -0500
commit4e8f24e9778e4f5d69862efa109d7f8284d1a119 (patch)
tree6e461d2771cdaa21b672d2f0d6de351d08a95524 /Source/cmGeneratorTarget.cxx
parent854e67985e25886770b4e76546afff9567ba99f0 (diff)
downloadcmake-4e8f24e9778e4f5d69862efa109d7f8284d1a119.tar.gz
PCH: Clear link interface cache when adding PCH object to it
On platforms using `CMAKE_LINK_PCH`, the implementation of `PRECOMPILE_HEADERS_REUSE_FROM`, when re-using the PCH from one object library in another, adds a PCH object file to the link interface. Clear any cached link interface to ensure it is used.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 9a67821c9b..d1c581997a 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -749,6 +749,12 @@ void cmGeneratorTarget::ClearSourcesCache()
this->LinkImplMap.clear();
}
+void cmGeneratorTarget::ClearLinkInterfaceCache()
+{
+ this->LinkInterfaceMap.clear();
+ this->LinkInterfaceUsageRequirementsOnlyMap.clear();
+}
+
void cmGeneratorTarget::AddSourceCommon(const std::string& src, bool before)
{
this->SourceEntries.insert(