[CMakeConfigDeps] Honor find_package verbosity level - #20275
[CMakeConfigDeps] Honor find_package verbosity level#20275franramirez688 wants to merge 3 commits into
find_package verbosity level#20275Conversation
find_package verbosity message
find_package verbosity messagefind_package verbosity level
memsharded
left a comment
There was a problem hiding this comment.
Not sure about implementation yet
| set({{filename}}_MESSAGE_MODE VERBOSE) | ||
| else() | ||
| set({{filename}}_MESSAGE_MODE STATUS) |
There was a problem hiding this comment.
I am not sure this is actually the best approach, seems weird to have this VERBOSE when QUIET is defined, to avoid printing it, but then if a user adds verbosity the QUIET is ignored? Is this how CMake is really expected to behave for other packages?
I know it is the CMakeDeps pattern implementation, but maybe it was not the best one?
What I see in some find modules out there is something like:
if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
message(STATUS " Import target: unwind::unwind")
endif()There was a problem hiding this comment.
I'd assume this is an escape hatch for --log-level overrides. Use-case: quiet by default, but if something goes wrong, re-run with higher verbosity so the quiet directive is overridden. But I'm not sure about that.
fcada89 to
d66687b
Compare
Changelog: Fix: Implements the
find_pacakgeverbosity level in CMakeConfigDeps.Docs: omit
Close: #20272