3.23: incomplete `cmake --debug-find-pkg` output
CMake 3.23 introduces --debug-find-pkg and --debug-find-var to cmake(1), which is very welcomed. However, the --debug-find-pkg output omits most useful information. In a CMake script containing:
set(CMAKE_FIND_DEBUG_MODE on)
find_package(LAPACK)
set(CMAKE_FIND_DEBUG_MODE off)
Or by using cmake --debug-find
outputs a large amount of pathfinding trace information, including:
find_library called with the following settings:
VAR: BLAS_openblas_LIBRARY
NAMES: "openblas"
Documentation: Path to a library.
Framework
Only Search Frameworks: 0
Search Frameworks Last: 0
Search Frameworks First: 0
AppBundle
Only Search AppBundle: 0
Search AppBundle Last: 0
Search AppBundle First: 0
CMAKE_FIND_USE_CMAKE_PATH: 1
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
find_library considered the following locations:
# long list of locations
While cmake --debug-find-pkg=LAPACK
only outputs:
find_package considered the following paths for LAPACK.cmake
The file was found at
cmake-3.23.0-rc1-windows-x86_64/share/cmake-3.23/Modules/FindLAPACK.cmake
We observe that cmake --debug-find-var
does work as expected -- like --debug-find
for specific variable(s).