柯南安装 --build 无法按预期工作

Conan install --build doesn't work as expected

本文关键字:工作 安装 --build 柯南      更新时间:2023-10-16

我正在尝试使用强制构建标志运行conan install以下载源代码,然后使用以下命令在本地计算机上构建它们:

conan install <conanfilePath> -s compiler="Visual Studio" -s compiler.version=8 --build

从我在此链接上读到的内容 柯南应该在一堆conanfile.py方法中运行source()build()

当我运行该命令时,它似乎没有操作source()方法,当我使用conan source命令单独运行它时,该方法运行良好,因此build()方法不起作用。

我错过了什么吗? 任何帮助将不胜感激。

如果本地缓存中不存在,柯南安装将下载源代码。这里有一个看:

https://docs.conan.io/en/latest/reference/conanfile/methods.html#source

作为开发流程手动运行源代码、构建和打包不是一回事。它不必像使用安装命令一样工作。这里有一个关于它的讨论:

https://github.com/conan-io/conan/issues/5165

如果要再次从源下载,请删除当前的包源:

conan remove -f <name/version@user/channel>
conan install <conanfilePath> -s compiler="Visual Studio" -s compiler.version=8 --build