Conan C/C++ Package Manager

Work In Progress

Useful commands:

[code language=”bash”]# List remotes
conan remote list

# Add remote
conan remote add <remote_name> http://localhost:9300

# Remove remote
conan remote remove <remote_name>

# List all recipes in remote
conan search -r <remote_name>

# A recipe looks like:
# cool_soft/0.1@michael/stable
# And it contains 4 fields: A/B@C/D
# These fields are:
# 1. "cool_soft" – is the name of the package, usually the same of the project
# 2. "0.1" – is the version, usually matching the one of the packaged project
# Can be any string, not necessarily a number, so it is possible to have a
# "develop" or "master" version. Packages can be overwritten, so it is also
# OK to have packages like "nightly" or "weekly", that are regenerated
# periodically.
# 3. "michael" – is the owner of this package version. It is basically a
# namespace that allows different users to have their own packages for the
# same library with the same name, and interchange them. So, for example,
# you can easily upload a certain library under your own user name "lasote",
# and later those packages can be uploaded without modifications to another
# official, group or company username.
# 4. "stable" – is the channel. Channels also allow to have different packages
# for the same library and use them interchangeably. They usually denote the
# maturity of the package, as an arbitrary string: "stable", "testing", but
# it can be used for any purpose, like package revisions (the library
# version has not changed, but the package recipe has evolved)

# Remove recipe from remote
conan remove cool_soft/0.1@michael/stable -r <remote_name>

# List existing packages for recipe
conan search -r <remote_name> cool_soft/0.1@michael/stable

# Create conan recipe
conan new

# Build package for recipe
conan create

# Exports a recipe & creates a package locally
conan export-pkg . cool_soft/0.1@michael/stable

# Upload conan recipe to server:
conan upload cool_soft/0.1@michael/stable -r <remote_name>

# Upload package in recipe to server:
conan upload cool_soft/0.1@michael/stable -p <package_id> -r <remote_name>

# Upload conan recipe and all packages to server:
conan upload cool_soft/0.1@michael/stable –all -r <remote_name>

# Generate table of binaries for recipe:
conan search cool_soft/0.1@michael/stable –table file.html -r <remote_name>

# Upgrade conan client to a newer version:
pip install conan –upgrade

# Remove package from recipe
conan remove -p <package_name> -r <remote_name>
conan remove cool_soft/0.1@michael/stable -p <package_name>

# Download package from remote recipe:
conan download -p <package_id> -r <remote_name> cool_soft/0.1@michael/stable

Thanks to .