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); } }