Skip to content

[CMakeConfigDeps] Honor find_package verbosity level - #20275

Open
franramirez688 wants to merge 3 commits into
conan-io:develop2from
franramirez688:frm/cmake_vlevel
Open

[CMakeConfigDeps] Honor find_package verbosity level#20275
franramirez688 wants to merge 3 commits into
conan-io:develop2from
franramirez688:frm/cmake_vlevel

Conversation

@franramirez688

Copy link
Copy Markdown
Contributor

Changelog: Fix: Implements the find_pacakge verbosity level in CMakeConfigDeps.
Docs: omit
Close: #20272

@franramirez688 franramirez688 added this to the 2.33.0 milestone Aug 18, 2026
@franramirez688 franramirez688 changed the title Implemented QUIET mode in CMakeConfigDeps [CMakeConfigDeps] Honor find_package verbosity message Aug 18, 2026
@franramirez688 franramirez688 changed the title [CMakeConfigDeps] Honor find_package verbosity message [CMakeConfigDeps] Honor find_package verbosity level Aug 18, 2026
Comment thread conan/tools/cmake/cmakeconfigdeps/config.py Outdated

@memsharded memsharded left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about implementation yet

Comment on lines +35 to +37
set({{filename}}_MESSAGE_MODE VERBOSE)
else()
set({{filename}}_MESSAGE_MODE STATUS)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@memsharded memsharded left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] CMakeConfigDeps ignores find_package's QUIET, CMakeDeps doesn't

4 participants