find_package: Consider removing PATH-derived search prefixes
#24216 (closed) tracked removal of PATH-derived search prefixes for find_library
, find_path
, and find_file
to restore their behavior from before CMake 3.3. However, the find_package
command still documents and implements PATH-derived search prefixes as it always has, even before CMake 3.3.
One reason for removal of PATH-derived search from the other commands was that users may put directories in their PATH
to get tools for any number of reasons, and that does not necessarily mean they want to use development packages from those prefixes. Since !8796 (merged) we search MSYS and MinGW environments' prefixes explicitly, so PATH
-derived prefixes are no longer needed for that use case.
We should consider removing PATH-derived search prefixes from find_package
too.