Building C++ Code with CMake [2019 Class Archive]

“Building C++ Code with CMake” is a two-day training course with programming exercises taught by David Faure of The KDAB Group. It is offered at the Gaylord Rockies from 9AM to 5PM on Saturday and Sunday, September 21st and 22nd, 2019 (immediately following the conference). Lunch is included.

Course Description

CMake is the de facto standard build system for C and C++ outside of frameworks that require their own. It has earned this place by supporting the situations and special cases that arise in real projects.

This course will teach the basics of creating and building projects with CMake. In recent years, CMake has introduced some cleaner and more precise constructs. The course will focus on the new constructs where possible.

CMake has broad functionality that covers many real world problems. Learning CMake enables you to solve advanced build requirements. This includes cross-platform builds, feature detection based on platform or available libraries, build-time configurable feature switches, custom build steps and even generating binary packages.

Course Topics

  • Build system overview
  • CMake overview and introduction
  • Targets and their dependencies
  • Finding external packages
  • Installing targets and files
  • CMake Language
  • Target properties
  • Writing finders
  • CMake versions and policies
  • Platform-independent file operations
  • Code generators
  • Packaging
  • Cross compilation
  • Qt5 support in CMake
  • Bonus material


Previous experience with any build system is sufficient background for this workshop.

Course Instructor

David Faure

David Faure is Senior Software Engineer and Trainer at KDAB. Long time KDE developer, he has been developing with Qt since 1998 and contributing to Qt itself since Qt 4.0. In addition to the many consulting projects he has delivered, David has taught modern C++, Qt development, as well as debugging and profiling on Linux, to numerous companies. He holds an MSc in Computer Science.