summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-26 11:12:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-26 11:13:24 (GMT)
commit9b68e4b1836ff39043ebf34aec5d1e97cebbeabc (patch)
tree63c6b5722a2680416c2ef00fa75d92937fd867d0 /Source
parent1e263065e12435ade250d83ab04e61c4453b12fe (diff)
parentd88b38d05d5bc7528667ed4f86842ab8f7ff2ba2 (diff)
downloadCMake-9b68e4b1836ff39043ebf34aec5d1e97cebbeabc.zip
CMake-9b68e4b1836ff39043ebf34aec5d1e97cebbeabc.tar.gz
CMake-9b68e4b1836ff39043ebf34aec5d1e97cebbeabc.tar.bz2
Merge topic 'implicit-includes-realpath'
d88b38d05d Normalize paths when checking for implicit include dirs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3467
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3abf2dd..801f0e8 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1017,7 +1017,7 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
}
for (std::string const& i : impDirVec) {
- if (implicitSet.insert(i).second) {
+ if (implicitSet.insert(cmSystemTools::GetRealPath(i)).second) {
implicitDirs.emplace_back(i);
}
}
@@ -1028,7 +1028,8 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
&lang](std::string const& dir) {
return (
// Do not exclude directories that are not in an excluded set.
- ((implicitSet.find(dir) == implicitSet.end()) &&
+ ((implicitSet.find(cmSystemTools::GetRealPath(dir)) ==
+ implicitSet.end()) &&
(implicitExclude.find(dir) == implicitExclude.end()))
// Do not exclude entries of the CPATH environment variable even though
// they are implicitly searched by the compiler. They are meant to be
@@ -1082,7 +1083,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 (implicitSet.find(udr.Value) != implicitSet.end()) {
+ if (implicitSet.find(cmSystemTools::GetRealPath(udr.Value)) !=
+ implicitSet.end()) {
emitBT(udr);
}
}