summaryrefslogtreecommitdiff
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorAlexander Grund <Flamefire@users.noreply.github.com>2021-07-06 16:11:42 +0200
committerBrad King <brad.king@kitware.com>2021-07-07 08:04:30 -0400
commit86595b300297c9572eea5710837f5bb12251c62f (patch)
tree3d10de507e94c162134c72b6887e705b9d6c311b /Source/cmLocalGenerator.cxx
parent10969fd003919ba32072ead5d134e024bd37f228 (diff)
downloadcmake-86595b300297c9572eea5710837f5bb12251c62f.tar.gz
cmLocalGenerator: Clarify check for membership in multiple sets
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 5fbff6c429..cfda21f5a6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1254,9 +1254,9 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
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, real_dir) &&
- !cm::contains(implicitExclude, dir))
+ // Do not exclude directories that are not in any excluded set.
+ !(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
// user-specified directories that can be re-ordered or converted to