Conan: Initialize conan without conan install

Created on 7 Mar 2019  路  2Comments  路  Source: conan-io/conan

I'm creating a docker image as build environment with cmake and conan. I install conan with pip and I want to initialize conan (create a default profile) and change compiler.stdcxx to libstdc++11 with sed. But I was not able to find a way to initialize conan and automatically create this file without calling conan install. Is there a way to create the default profile without installing anything?

question

All 2 comments

First, it is really, really recommended to use your own profiles and not rely on the automatically generated one. If something goes wrong with the automatic detection, or something changes in your environment without intention, it is less likely to be detected. Automatic detection is not perfect.

In any case, if you want to do that creation you can:

$ conan profile new default --detect

Then you can change that with:

$ conan profile update settings.compiler.libcxx=libstdc++11 default

Thanks. --detect did the trick. And conan profile update settings.compiler.libcxx=libstdc++11 default is better than my sed solution.

Was this page helpful?
0 / 5 - 0 ratings