summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-11 14:21:38 (GMT)
committerBrad King <brad.king@kitware.com>2016-07-11 14:27:27 (GMT)
commit54475018ae3ea04558b5372bc270e7c08af723f4 (patch)
tree3d2b5a3c6bb01138a91a0acbeda8ca1d2166507a /Source/cmFindBase.cxx
parente31084e65745f9dd422c6aff0a2ed4ada6918805 (diff)
downloadCMake-54475018ae3ea04558b5372bc270e7c08af723f4.zip
CMake-54475018ae3ea04558b5372bc270e7c08af723f4.tar.gz
CMake-54475018ae3ea04558b5372bc270e7c08af723f4.tar.bz2
Restore find_(library|file|path) search of PATH itself
The fix in commit commit v3.6.0-rc1~82^2 (Drop find_(library|file|path) prefixes from PATH on non-Windows, 2016-05-09) aggressively dropped search of the entries in PATH itself in addition to the prefixes derived from it. This regresses find modules that (incorrectly) depended on the behavior, including some of our own modules such as FindImageMagick. Restore the search of entries in PATH itself. If we want to drop it later we will need to do so with a policy. Fixes #16192.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r--Source/cmFindBase.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 082bbf0..c785e6c 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -226,12 +226,10 @@ void cmFindBase::FillSystemEnvironmentPath()
paths.AddEnvPath(this->EnvironmentPath);
#if defined(_WIN32) || defined(__CYGWIN__)
paths.AddEnvPrefixPath("PATH", true);
- paths.AddEnvPath("PATH");
#endif
- } else {
- // Add PATH
- paths.AddEnvPath("PATH");
}
+ // Add PATH
+ paths.AddEnvPath("PATH");
paths.AddSuffixes(this->SearchPathSuffixes);
}