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.
This commit is contained in:
Cristian Adam committed 2026-10-14 07:33:47 +02:00
1 parent 2c1b01e4fe
commit ee657c9517
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -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();
+2 -1
View File
@@ -1544,7 +1544,8 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
if (!stripImplicitDirs) {
// Append implicit directories that were requested by the user only
for (BT<std::string> const& udr : userDirs) {
if (cm::contains(implicitSet, cmSystemTools::GetRealPath(udr.Value))) {
if (cm::contains(implicitSet,
this->GlobalGenerator->GetRealPath(udr.Value))) {
emitBT(udr);
}
}