conan

conan Cheatsheet #

Conan is a package manager for C and C++ that helps manage dependencies, build configurations, and package distribution across various platforms.

Basic Commands #

Command/OptionExampleDescription
conan installconan install .Install dependencies from a conanfile.txt or conanfile.py
conan createconan create . user/channelCreate a package from a recipe and upload it to a remote
conan uploadconan upload pkg/1.0@user/channel --allUpload a package to a remote repository
conan removeconan remove pkg/1.0@user/channelRemove a package from the local cache
conan infoconan info .Display information about the dependencies
conan searchconan search pkg/1.0@user/channelSearch for a package in remotes

Package Management #

Command/OptionExampleDescription
conan listconan listList all packages in the local cache
conan downloadconan download pkg/1.0@user/channelDownload a package from a remote repository
conan exportconan export . user/channelExport a package recipe to the local cache
conan uploadconan upload pkg/1.0@user/channel --allUpload a package to a remote repository

Configuration #

Command/OptionExampleDescription
conan config installconan config install config.jsonInstall configuration from a file
conan config installconan config install config.jsonInstall configuration from a file
conan config setconan config set general.revisions_enabled=TrueSet a configuration option
conan config removeconan config remove general.revisions_enabledRemove a configuration option

Remote Management #

Command/OptionExampleDescription
conan remote addconan remote add myremote http://myremote.comAdd a new remote repository
conan remote listconan remote listList all remote repositories
conan remote removeconan remote remove myremoteRemove a remote repository
conan remote updateconan remote update myremote http://newurl.comUpdate a remote repository URL

Profiles #

Command/OptionExampleDescription
conan profile newconan profile new myprofileCreate a new profile
conan profile listconan profile listList all profiles
conan profile showconan profile show myprofileShow details of a profile
conan profile updateconan profile update settings.compiler=gcc myprofileUpdate profile settings

Advanced Commands #

Command/OptionExampleDescription
conan graphconan graph info .Display the dependency graph
conan packageconan package info pkg/1.0@user/channelShow package information
conan buildconan build .Build a package from a recipe

This cheatsheet covers essential Conan commands for managing C/C++ packages, including installation, configuration, remote management, and more.

conan

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.