When using CMake policies 3.14 and below, the export(PACKAGE)
command by default populates the user package registry, which is stored outside the build tree. Setting the CMAKE_EXPORT_NO_PACKAGE_REGISTRY
variable disables this side effect.
In CMake 3.15 and later, this behavior is disabled by default, and the variable has no effect.
This PR forces CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE
globally, rather than managing it for each dependency package individually rather. It may be reverted once all CMake-based packages have updated to policies 3.15 or newer.
Fixes #32938.