CMake and Conan: past, present and future

Speaker: Diego Rodriguez-Losada

Audience level: [ Beginner | Intermediate | Advanced ]

From legacy variable-based dependencies to Common Package Specification (CPS)

CMake and Conan have been continuously evolving since their origin. Specifically, dependency management in CMake has evolved from using variables defined in find modules, to using usage requirements in imported targets defined in config files. More recently, toolchain files, CMake presets, the new CMake dependency providers and the preliminary work towards a Common Package Specification (CPS) are creating new integration possibilities. In parallel to this, the Conan package manager and CMake integrations have also greatly changed over years to provide an improved and transparent CMake integration and better developer experience.

This talk will quickly review the past approaches, their pitfalls, and how modern CMake and Conan integrations have improved over them:

  • From variables, to targets, to transparent targets integration with modern Conan generators
  • Better separation of concerns to align binary configurations using CMake toolchains
  • Improving the developer experience with CMake presets
  • The new CMake-Conan integration using CMake’s new dependency providers feature for transparent installation of dependencies

The talk will finalize with an overview of ongoing work over a Common Package Specification (CPS) proposal, how CMake and Conan already have early partial implementations, and it will finish summarizing future steps.