相当于自动运行前面的所有命令,不同的是生成的目录和文件 在 本地的缓存: ~/.conan/… ,而不是在当前文件。

    现在我们知道我们已经完成了配方的所有步骤。 因此,现在将尝试运行配方并将其完全放入本地缓存中。
    通常的命令是conan create,它基本上使用test_package文件夹的conan test执行先前的命令:

    1. $ conan create . user/channel

    即使使用此命令,如果某些操作无效,程序包创建者也可以遍历本地缓存。 这可以通过--keep-source--keep-build标志来完成。
    如果在跟踪中看到source()方法已正确执行,但包创建最终失败,则可以在下次使用--keep-source创建conan create时跳过source()方法:

    1. $ conan create . user/channel --keep-source
    2. hello/1.1@user/channel: A new conanfile.py version was exported
    3. hello/1.1@user/channel: Folder: C:\Users\conan\.conan\data\hello\1.1\user\channel\export
    4. hello/1.1@user/channel (test package): Installing C:\Users\conan\repos\features\package_development_flow\test_package\conanfile.py
    5. Requirements
    6. hello/1.1@user/channel from local
    7. Packages
    8. hello/1.1@user/channel:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7
    9. hello/1.1@user/channel: WARN: Forced build from source
    10. hello/1.1@user/channel: Building your package in C:\Users\conan\.conan\data\hello\1.1\user\channel\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7
    11. hello/1.1@user/channel: Configuring sources in C:\Users\conan\.conan\data\hello\1.1\user\channel\source
    12. Cloning into 'hello'...
    13. remote: Counting objects: 17, done.
    14. remote: Total 17 (delta 0), reused 0 (delta 0), pack-reused 17
    15. Unpacking objects: 100% (17/17), done.
    16. Switched to a new branch 'static_shared'
    17. Branch 'static_shared' set up to track remote branch 'static_shared' from 'origin'.
    18. hello/1.1@user/channel: Copying sources to build folder
    19. hello/1.1@user/channel: Generator cmake created conanbuildinfo.cmake
    20. hello/1.1@user/channel: Calling build()
    21. ...

    如果您发现库的构建也正确,您也可以使用 --hold-build标志跳过build() 步骤:

    1. $ conan create . user/channel --keep-build