本文档翻译自:https://docs.conan.io/en/latest/reference/commands/misc/profile.html
$ conan profile [-h] {list,show,new,update,get,remove} ...
列出“ .conan / profiles”文件夹中的个人资料,或显示个人资料详细信息。
“ list”子命令将始终使用默认用户“ conan / profiles”文件夹。 但是,“ show”子命令可以解析绝对路径和相对路径,以及将名称映射到“ .conan / profiles”文件夹的方式与“ -profile”安装参数的方式相同。
positional arguments:
{list,show,new,update,get,remove}
list List current profiles
show Show the values defined for a profile
new Creates a new empty profile
update Update a profile with desired value
get Get a profile key
remove Remove a profile key
optional arguments:
-h, --help show this help message and exit
Examples
**
列出配置文件:
$ conan profile list
> myprofile1
> myprofile2
打印配置文件内容:
$ conan profile show myprofile1
Profile myprofile1
[settings]
...
打印配置文件内容(在标准目录.conan/profiles中):
$ conan profile show myprofile1
Profile myprofile1
[settings]
...
打印配置文件内容(在自定义目录中):
$ conan profile show /path/to/myprofile1
Profile myprofile1
[settings]
...
通过位于自定义目录中的配置文件更新设置:
$ conan profile update settings.build_type=Debug /path/to/my/profile
向默认配置文件添加新选项:
$ conan profile update options.zlib:shared=True default
创建一个新的空配置文件:
$ conan profile new /path/to/new/profile
创建一个新的配置文件来检测设置:
$ conan profile new /path/to/new/profile --detect
使用检测到的设置创建新的或覆盖现有的配置文件:
$ conan profile new /path/to/new/profile --detect --force