简体   繁体   English

将带缓存的.conan文件夹放到当前项目文件夹

[英]Put .conan folder with cache to the current project folder

Is there any way to create.conan folder in the root of the current project on building stage?有没有办法在构建阶段的当前项目的根目录中创建.conan 文件夹?

You can define CONAN_USER_HOME environment variable to point to your current folder, that will put the Conan cache there.您可以定义CONAN_USER_HOME环境变量以指向您当前的文件夹,这会将 Conan 缓存放在那里。 However this doesn't have many advantages, one of the reasons of having the cache separated is that it is way more efficient to have the packages installed in a common place, and they can be used in multiple projects.然而,这并没有太多优势,将缓存分开的原因之一是将包安装在一个公共位置效率更高,并且它们可以在多个项目中使用。 And given the structure of the cache, different versions or different configurations (shared/static, Debug/Release, etc) will not conflict, they can be installed simultaneously.并且给定缓存结构,不同版本或不同配置(shared/static、Debug/Release等)不会冲突,可以同时安装。

Conan 2.0 implements a .conanrc file that you can put in your project root and that allows defining the CONAN_HOME variable automatically. Conan 2.0 实现了一个.conanrc文件,您可以将该文件放在项目根目录中,并允许自动定义CONAN_HOME变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM