summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-11 10:21:38 -0400
committerBrad King <brad.king@kitware.com>2016-07-11 10:27:27 -0400
commit54475018ae3ea04558b5372bc270e7c08af723f4 (patch)
tree3d2b5a3c6bb01138a91a0acbeda8ca1d2166507a
parente31084e65745f9dd422c6aff0a2ed4ada6918805 (diff)
downloadcmake-54475018ae3ea04558b5372bc270e7c08af723f4.tar.gz
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.
-rw-r--r--Source/cmFindBase.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 082bbf013b..c785e6c676 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);
}