CMAKE_PREFIX_PATH with clang-cl didn't find package

I had a small MSVC x64 project using the template library inja, just to check that I could work with it in a larger project. It used find_package to locate where cget installed the inja package. To do that I set CMAKE_PREFIX_PATH to the cget directory. I set up the same project to also build using clang-cl x64 and the ninja build tool. However, to allow it to find inja I had to set inja_DIR; it seemed to ignore CMAKE_PREFIX_DIR. I am wondering if anyone could explain why that is, or suggest how I might investigate. The project is here: GitHub - coder451/cmake-find-inja: Small project using inja with cmake.

Note: If NO_DEFAULT_PATH is specified all NO_* options are enabled.

see config-mode-search-procedure

Without NO_DEFAULT_PATH it fails in the same way after looking in various irrelevant places.

try cmake --debug-find-pkg=…

Thanks for that. Running with it showed me what was going on. But it looks like this is a Heisenbug - today the two builds are behaving the same. Sorry for the noise.