CMake 3.12.0+ honor <Package>_ROOT environment hints which are often set on HPC systems. Previously, it was only looking for <Package>_DIR paths in find_package calls.
This new policy is useful since HPC systems usually set _DIR, _ROOT or expand the CMAKE_PREFIX_PATH. Therefore we want to use it as soon as it is available.
On systems where those env vars are set, e.g. Hypnos, this also throws a warning if the default (OLD) policy is used with CMake 3.12.4 or newer.
CMake 3.12.0+ honor
<Package>_ROOT
environment hints which are often set on HPC systems. Previously, it was only looking for<Package>_DIR
paths infind_package
calls.This new policy is useful since HPC systems usually set
_DIR
,_ROOT
or expand theCMAKE_PREFIX_PATH
. Therefore we want to use it as soon as it is available.On systems where those env vars are set, e.g. Hypnos, this also throws a warning if the default (OLD) policy is used with CMake 3.12.4 or newer.
References: