本文档翻译自:https://docs.conan.io/en/latest/getting_started.html#inspecting-dependencies
检查本地缓存包(通常是 .conan/data),并且可以从该位置重用于其他项目。这样,即使没有网络连接,也可以清理当前项目并继续工作。要在本地缓存中搜索包,请运行:
$ conan search "*"Existing package recipes:openssl/1.0.2tpoco/1.9.4zlib/1.2.11
要检查参考运行的不同二进制包:
$ conan search poco/1.9.4@Existing packages for recipe poco/1.9.4:Package_ID: 645aaff0a79e6036c77803601e44677556109dd9[options]cxx_14: Falseenable_apacheconnector: Falseenable_cppparser: Falseenable_crypto: Trueenable_data: True...
包名称末尾的 @ 符号对于搜索特定的包很重要。如果您不添加 @,则Conan会将参数解释为模式搜索,并返回所有与 poco/1.9.4 匹配的包。
要检查当前项目的所有依赖包,请使用 conan info 命令,将其指向 conanfile.txt 文件夹的位置:
$ conan info ..conanfile.txtID: db91af4811b080e02ebe5a626f1d256bb90d5223BuildID: NoneRequires:poco/1.9.4openssl/1.0.2tID: eb50d18a5a5d59bd0c332464a4c348ab65e353bfBuildID: NoneRemote: conan-center=https://api.bintray.com/conan/conan/conan-centerURL: https://github.com/conan-io/conan-center-indexHomepage: https://github.com/openssl/opensslLicense: OpenSSLDescription: A toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocolsTopics: conan, openssl, ssl, tls, encryption, securityRecipe: CacheBinary: CacheBinary remote: conan-centerCreation date: 2019-11-13 23:14:37Required by:poco/1.9.4Requires:zlib/1.2.11poco/1.9.4ID: 645aaff0a79e6036c77803601e44677556109dd9BuildID: NoneRemote: conan-center=https://api.bintray.com/conan/conan/conan-centerURL: https://github.com/conan-io/conan-center-indexHomepage: https://pocoproject.orgLicense: BSL-1.0Description: Modern, powerful open source C++ class libraries for building network- and internet-based applications that run on desktop, server, mobile and embedded systems.Topics: conan, poco, building, networking, server, mobile, embeddedRecipe: CacheBinary: CacheBinary remote: conan-centerCreation date: 2020-01-07 17:29:24Required by:conanfile.txtRequires:openssl/1.0.2tzlib/1.2.11ID: f74366f76f700cc6e991285892ad7a23c30e6d47BuildID: NoneRemote: conan-center=https://api.bintray.com/conan/conan/conan-centerURL: https://github.com/conan-io/conan-center-indexHomepage: https://zlib.netLicense: ZlibDescription: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)Recipe: CacheBinary: CacheBinary remote: conan-centerCreation date: 2020-01-07 17:01:29Required by:openssl/1.0.2t
或使用Dot或HTML格式生成依赖关系图:
$ conan info .. --graph=file.html$ file.html # or open the file, double-click

