本文档翻译自:https://docs.conan.io/en/latest/getting_started.html#inspecting-dependencies

    检查本地缓存包(通常是 .conan/data),并且可以从该位置重用于其他项目。这样,即使没有网络连接,也可以清理当前项目并继续工作。要在本地缓存中搜索包,请运行:

    1. $ conan search "*"
    2. Existing package recipes:
    3. openssl/1.0.2t
    4. poco/1.9.4
    5. zlib/1.2.11

    要检查参考运行的不同二进制包:

    1. $ conan search poco/1.9.4@
    2. Existing packages for recipe poco/1.9.4:
    3. Package_ID: 645aaff0a79e6036c77803601e44677556109dd9
    4. [options]
    5. cxx_14: False
    6. enable_apacheconnector: False
    7. enable_cppparser: False
    8. enable_crypto: True
    9. enable_data: True
    10. ...

    包名称末尾的 @ 符号对于搜索特定的包很重要。如果您不添加 @,则Conan会将参数解释为模式搜索,并返回所有与 poco/1.9.4 匹配的包。

    要检查当前项目的所有依赖包,请使用 conan info 命令,将其指向 conanfile.txt 文件夹的位置:

    1. $ conan info ..
    2. conanfile.txt
    3. ID: db91af4811b080e02ebe5a626f1d256bb90d5223
    4. BuildID: None
    5. Requires:
    6. poco/1.9.4
    7. openssl/1.0.2t
    8. ID: eb50d18a5a5d59bd0c332464a4c348ab65e353bf
    9. BuildID: None
    10. Remote: conan-center=https://api.bintray.com/conan/conan/conan-center
    11. URL: https://github.com/conan-io/conan-center-index
    12. Homepage: https://github.com/openssl/openssl
    13. License: OpenSSL
    14. Description: A toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols
    15. Topics: conan, openssl, ssl, tls, encryption, security
    16. Recipe: Cache
    17. Binary: Cache
    18. Binary remote: conan-center
    19. Creation date: 2019-11-13 23:14:37
    20. Required by:
    21. poco/1.9.4
    22. Requires:
    23. zlib/1.2.11
    24. poco/1.9.4
    25. ID: 645aaff0a79e6036c77803601e44677556109dd9
    26. BuildID: None
    27. Remote: conan-center=https://api.bintray.com/conan/conan/conan-center
    28. URL: https://github.com/conan-io/conan-center-index
    29. Homepage: https://pocoproject.org
    30. License: BSL-1.0
    31. Description: Modern, powerful open source C++ class libraries for building network- and internet-based applications that run on desktop, server, mobile and embedded systems.
    32. Topics: conan, poco, building, networking, server, mobile, embedded
    33. Recipe: Cache
    34. Binary: Cache
    35. Binary remote: conan-center
    36. Creation date: 2020-01-07 17:29:24
    37. Required by:
    38. conanfile.txt
    39. Requires:
    40. openssl/1.0.2t
    41. zlib/1.2.11
    42. ID: f74366f76f700cc6e991285892ad7a23c30e6d47
    43. BuildID: None
    44. Remote: conan-center=https://api.bintray.com/conan/conan/conan-center
    45. URL: https://github.com/conan-io/conan-center-index
    46. Homepage: https://zlib.net
    47. License: Zlib
    48. Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)
    49. Recipe: Cache
    50. Binary: Cache
    51. Binary remote: conan-center
    52. Creation date: 2020-01-07 17:01:29
    53. Required by:
    54. openssl/1.0.2t

    或使用Dot或HTML格式生成依赖关系图:

    1. $ conan info .. --graph=file.html
    2. $ file.html # or open the file, double-click

    image.png