Conan.io package for Boost Libraries.
The packages generated with this conanfile can be found in Bintray.
This package is not intended to be used outside of building the Boost libraries for Conan.io. It is also a special Conan package, in that it is a "Generator" package. Read about creating custom generators for Conan.io here.
Generators are distributed just like other packages, and used in other packages as build_requires
. Notably, this generator is intended to be used specifically with the boost build system as packaged by Bincrafters. Below is a summary of how the generation and build process work for this generator; we'll use Boost.System as an example.
- Look at the recipe for Boost.System here: Boost System Recipe
- The Boost.System library recipe is invoked using
conan create bincrafters/stable
- This Boost.Generator package is listed in
build_requires
, and thus downloaded - The appropriate version of Boost.Build is also downloaded transitively
- All runtime dependencies listed in
requires
are downloaded - This generator's
content
method is invoked, producing the filejamroot
in a conan build directory - Notably, boostcpp.jam is extracted into a conan directory, which is referenced by the build
- The
build()
step of Boost.System is run- This calls the Boost Build binary ("b2") from a conan directory
- The generated file
jamroot
is passesd as an argument
- The package step is run, collecting any generated binaries and header files
- The package for Boost.System is stored in the local conan cache
- The Boost.System recipe is downloaded from conan
- If the appropriate pre-built binaries are available from the remote repository, they are downloaded
- If not, the build and package process above is executed, and stored in the local conan cache
The following should exist in conanfile.py
for any Boost library which is not a header-only library, and needs to be built.
build_requires = "Boost.Generator/1.65.1@bincrafters/stable"
generators = "boost"
The example below shows the commands used to publish to bincrafters conan repository. To publish to your own conan respository (for example, after forking this git repository), you will need to change the commands below accordingly.
The following command both runs all the steps of the conan file, and publishes the package to the local system cache. This includes downloading dependencies from build_requires
and requires
, and then running the build()
and package()
methods.
$ conan create bincrafters/stable
$ conan remote add bincrafters "https://api.bintray.com/conan/bincrafters/public-conan"
$ conan upload --all --remote bincrafters Boost.Generator/1.65.1@bincrafters/stable