conan
conan copied to clipboard
[suggestion] Remove "Dependency X already found" messages
Multiple status messages in the form "Dependency X already found" are logged when consuming Conan packages using the cmake_find_package_multi generator by calling find_package(), for example find_package(gRPC REQUIRED NO_MODULE). These messages can not be silenced with the CMake variable CONAN_CMAKE_SILENT_OUTPUT (they should maybe also be silenced when passing the QUIET option which currently doesn't seem to be the case: find_package(gRPC QUIET) - also see https://github.com/conan-io/conan/issues/9959).
My suggestion is to remove these messages completely, because they do not provide any useful information to the user.
- The message is expected in many situation: When two dependencies A and B of my project both have a dependency to C then it is expected that after
find_package(A)the callfind_package(B)will output thatCis already found. There is nothing a user can do to "fix" this message. - Files generated by Conan often produce multiple of these messages even if my project only has a single dependency. As of today, the generated file
gRPCConfig.cmakecontainsfind_dependency(absl REQUIRED NO_MODULE)and the linemessage(STATUS "Dependency absl already found")13 times resulting in 12 messages "Dependency absl already found" from a single dependency alone. Again there is nothing that can be done to "fix" this.
Typical output when using Protobuf and gRPC:
-- Dependency ZLIB already found
-- Dependency protobuf already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency ZLIB already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency OpenSSL already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency absl already found
-- Dependency absl already found
- [x] I've read the CONTRIBUTING guide.
Environment Details
- Operating System: Windows 10 Enterprise 20H2
- Conan version: 1.50.0
- Python version: 3.7.3
Sorry, we are not maintaining the old generators anymore, only for blocking bugs. The only recommended (to be prepared to 2.0 where the cmake_*** are removed) is the CMakeDeps + CMakeToolchain. There we took better care of the verbosity of the messages already.
Thanks.