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.
This commit is contained in:
parent
e31084e657
commit
54475018ae
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue