How do I tell CMake to output the package search paths?
10:56 21 Jan 2019

I'm compiling libdwarf on Windows. In its root CMakeLists.txt, it attempts to find LibElf via:

find_package(LibElf REQUIRED)

LibElf doesn't use CMAKE and I haven't configured it to register itself in any way, so of course the find_package fails. I'd like CMake to print out all the paths under which it is searching for LibElf at runtime. How do I tell CMake to output this? I've tried --trace but that just show me the execution flow through my CMakeLists.txt files--not the locations where CMake itself is presently looking for packages.

I know the documentation for find_package describes where CMake searches, but I can modify that behavior with all sorts of variables, environment variables, and registry settings. I'd like to see where exactly CMake is looking given all my modifications to those items I just mentioned.

I should note that libdwarf includes a cmake/FindLibElf.cmake module. Perhaps what I'm asking for isn't possible if FindLibElf.cmake is free to do whatever it pleases?

windows cmake