Skip to content

About

Example of workspace feature

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

conanci_workspace

Example of a Conan workspace that collapses several independently versioned packages into a single CMake super-build for development.

The packages live in their own repositories: mathlib, ai, graphics, engine and game.

Requirements: Conan >= 2.31, CMake >= 3.25, git, and a C++ compiler.

$ git clone https://github.com/conan-io/conanci_workspace.git game-dev
$ cd game-dev

# Create the packages in the local Conan cache (plays the role of CI)
$ python bootstrap.py

# Clone the packages to work on, at the exact commit of each package
$ conan workspace add --ref ai/1.0
$ conan workspace add --ref game/1.0
# Add the intermediate packages (engine) that must be rebuilt too
$ conan workspace complete

# Install external dependencies and generate a single toolchain for the super-build
$ conan workspace super-install
$ cmake --preset conan-release    # use "conan-default" on Windows
$ cmake --build --preset conan-release

Files:

  • conanws.py: defines the super-build ConanFile (layout, generators, toolchain) and writes the packages build order for CMake.
  • CMakeLists.txt: the super-project, adding each package as a subproject with FetchContent and OVERRIDE_FIND_PACKAGE.
  • conanws.yml: the list of workspace packages, filled by conan workspace add.
  • bootstrap.py: clones the package repositories to a temporary folder and runs conan create in order. Extra arguments are forwarded, e.g. python bootstrap.py -s build_type=Debug.

More information:

About

Example of workspace feature

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages