Skip to content

find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9

Brad King requested to merge brad.king/cmake:find-package_root-disable into master

Disable the feature added by !796 (merged). Unfortunately the name <pkg>_ROOT may already be set by projects for their own incompatible purposes. Disable the behavior change for now to fix the regression for CMake 3.9. We can restore it later with a policy.

In order to keep the implementation and tests working, add an undocumented variable we can use in the tests to enable the behavior before the policy is introduced.

Fixes: #17144 (closed)

Merge request reports