For many years C++ did not have a good and widely adopted build system and dependency manager. What we had was considered messy, hard, and limited. The situation has changed with the introduction of Modern CMake and Conan package manager. Both of the tools are free and open-sourced.
CMake is de-facto standard for C++. It is widely supported by nearly all IDEs and, together with the Ninja generator, delivers probably the fastest build times for large C++ projects. A "Modern CMake" is a subset of old CMake features with the addition of so-called "targets". It allows equipping our projects with an easy to create and maintain build systems.
Conan is a dependency and package manager specifically designed and optimized for accelerating the development and Continuous Integration of C and C++ projects. It has capabilities to build-from source and full binary management. Thanks to that it can create and reuse any number of different binaries for different configurations and any number of different versions of a package, using the same process in all platforms. As it is decentralized, it is easy to run your server to host your packages and binaries privately, without needing to share them. Those features make Conan an excellent solution for enterprise needs.
The training is recommended to all C++ developers and architects. It should be considered mandatory for those that develop or distribute C++ library projects.
Note: This is not a complete CMake and Conan training. The workshop scopes on teaching on how to use Modern CMake and Conan to end up with a successful project that is easy to build, distribute/share, and maintain. In case you are interested in a full CMake or Conan training please let us know.
TRAINING HIGHLIGHTS
- Understanding of the issues with legacy CMake approach and dependency management
- Emphasis on Modern CMake, libraries encapsulation, and transitivity
- Realizing how Conan can improve dependencies handling and package management in your organization
TRAINING AGENDA
The following plan is an initial proposal for the training material. The final agenda is always created based on the individual pre-training analysis of the client's requirements and constraints.
- Modern Project Structure
- How To Handle Dependencies?
- Robust Project Structure
- In-source Vs Out-of-source builds
- Modern CMake (4 days)
- Command Line, Generators, and Build Types
- A Minimal Project
- Targets, Aliases, Encapsulation, And Transitivity
- Properties
- Subdirectories
- Testing Support
- Generator Expressions
- Installing And Finding Dependencies
- Custom Tasks
- Version Number and Configured Header Files
- Variables
- Flow control
- Scope
- Functions, Macros, And Argument Handling
- Math, Strings, and Lists
- Modules
- Project Installation
- Debugging And Diagnostics
- Advanced CMake (1 day)
- Policies
- Custom Build Types
- Checking Existence and Support
- Invoking Arbitrary Code
- Forwarding Command Arguments
- Custom Tasks (Configure Stage)
- Specifying Version Details
- Libraries
- Finding Things
- Find Modules
- External Content
- Toolchains And Cross-Compiling
- Packaging
- Build Performance
- Working With Files
- Conan (1 day)
- Conan Environment
- Basic Command Line Usage
- Installing Dependencies
- Generators
- Recipe
- Profiles, settings, options
- Different Ways To Create a Package
- Uploading Packages
- Conan Package Tools