From ee657c95175c7338a5a8a28654482bab33b74129 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 8 Oct 2026 17:36:43 +0200 Subject: [PATCH] cmLocalGenerator: Use cached real paths for implicit include directories Include directories requested by the user that are also implicit include directories were resolved with an uncached real path lookup for every target and configuration. Use the cached lookup of the global generator, as for the other include directories, and clear that cache on every configure. --- Source/cmGlobalGenerator.cxx | 1 + Source/cmLocalGenerator.cxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ec681a6500..c8ab360e44 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2604,6 +2604,7 @@ void cmGlobalGenerator::ClearGeneratorMembers() this->RuleHashes.clear(); this->DirectoryContentMap.clear(); this->ExistingSourceFiles.clear(); + this->RealPaths.clear(); this->XcFrameworkPListContentMap.clear(); this->BinaryDirectories.clear(); this->GeneratedFiles.clear(); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6b8995d70a..330d9a5a29 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1544,7 +1544,8 @@ std::vector> cmLocalGenerator::GetIncludeDirectoriesImplicit( if (!stripImplicitDirs) { // Append implicit directories that were requested by the user only for (BT const& udr : userDirs) { - if (cm::contains(implicitSet, cmSystemTools::GetRealPath(udr.Value))) { + if (cm::contains(implicitSet, + this->GlobalGenerator->GetRealPath(udr.Value))) { emitBT(udr); } }