From 3fd56472c6b6a78ba47cea0905a1694a7e6cec38 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 6 Jul 2021 16:11:42 +0200 Subject: cmLocalGenerator: Store realpath lookup result in a variable --- Source/cmLocalGenerator.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f58f142..051b15a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1251,10 +1251,11 @@ std::vector> cmLocalGenerator::GetIncludeDirectoriesImplicit( // Checks if this is not an excluded (implicit) include directory. auto notExcluded = [this, &implicitSet, &implicitExclude, - isCorCxx](std::string const& dir) { + isCorCxx](std::string const& dir) -> bool { + std::string const& real_dir = this->GlobalGenerator->GetRealPath(dir); return ( // Do not exclude directories that are not in an excluded set. - ((!cm::contains(implicitSet, this->GlobalGenerator->GetRealPath(dir))) && + ((!cm::contains(implicitSet, real_dir)) && (!cm::contains(implicitExclude, dir))) // Do not exclude entries of the CPATH environment variable even though // they are implicitly searched by the compiler. They are meant to be -- cgit v0.12