From 54475018ae3ea04558b5372bc270e7c08af723f4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 11 Jul 2016 10:21:38 -0400 Subject: 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. --- Source/cmFindBase.cxx | 6 ++---- 1 file 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); } -- cgit v0.12