CMake: deleted dependency prefix — find_package re-searches, find_library doesn't
Tested with CMake 3.28.3 and a minimal project using find_library(FOO_LIB foo) plus find_package(Bar CONFIG). After configuring against prefix v1, I deleted that prefix and reconfigured with -DCMAKE_PREFIX_PATH=<v2>. Bar_DIR was re-searched, because the cached directory no longer contained BarConfig.cmake, and it moved to v2. FOO_LIB kept the path of the deleted libfoo.so, and configure printed nothing about it. With both prefixes still present, neither moved, and the only hint was 'Manually-specified variables were not used by the project: CMAKE_PREFIX_PATH'. That hint disappears as soon as any other find call searches. Clear specific entries in the same command (-DCMAKE_PREFIX_PATH=... -UFOO_LIB -UBar_DIR, which worked) or use cmake --fresh. A CMAKE_BUILD_TYPE environment variable is likewise read only when the cache entry doesn't exist yet: on an already-configured dir with an empty type it was ignored.