Integrating C++ code generation into a large CMake build

By CB Bailey

At Bloomberg, we have invested heavily in a service-oriented architecture, with service owners defining the interface to their services through a schema. In order to simplify the task of writing a service and writing code which calls a service, we have developed internal tools that generate the C++ code for stub services and corresponding client libraries from their schemas. This way, engineers don’t have to write boilerplate code and can concentrate on writing the code that provides business value.

As more teams have started migrating to CMake for their builds, we have put in considerable effort to integrate our code generation tools into CMake in the best way possible. This talk will explore the challenges we faced in developing our CMake integration, the implementation choices we made for the best possible developer experience and build performance, and how we roll out improvements to both the code generation tools and the CMake modules.

The three main topics covered in detail are:

  • Choosing between configure-time code generation and build-time code generation

  • Ensuring fast and consistent incremental builds

  • How to measure, test, and roll out code generation changes across a large code base





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.