Home > Back-end >  Put .conan folder with cache to the current project folder
Put .conan folder with cache to the current project folder

Time:11-15

Is there any way to create .conan folder in the root of the current project on building stage?

CodePudding user response:

You can define CONAN_USER_HOME environment variable to point to your current folder, that will put the Conan cache there. 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.

Conan 2.0 implements a .conanrc file that you can put in your project root and that allows defining the CONAN_HOME variable automatically.

  • Related