Integrating C++ Code Generation Into a Large CMake Build
summary
Bloomberg uses an XSD-driven generator to emit C++ stubs and libraries and the talk shows how that generator integrates with CMake to avoid forcing teams to hand-edit generated code. It compares configure-time generation (runs during CMake configure so generated headers exist for static analysis) versus build-time add_custom_command, then describes a practical implementation that writes a small top-level project, runs generators in parallel via a deferred CMake build, emits depfiles, generates into a temp dir and only copies changed files — resulting in fast, correct incremental builds and workable rollouts across a large codebase.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 10:11Code generation overview
- 25:25CMake build-time generation
- 39:57Configure-time generation
- 50:31Advanced CMake module
- 1:03:49Deferred generation demo
- 1:10:40Dependency files and future
related talks
54mCMake for the Impatient
01h 34mThings I Learnt While Trying to Avoid Becoming a CMake Expert
01h 32mMistakes to Avoid When Writing C++ Projects
01h 01mGit, CMake, Conan - How to ship and reuse our C++ projects
26mModern CMake for reusable, portable and testable embedded projects
53mStandard C++ Toolset
05mWhy is C++ so Slow?
22mBuilding Portable C++ Packages: The Bliss of Unification
