8

Executing Custom Tasks with CMake

Building and shipping software can be a complex task, and no tool can ever do all the different tasks that are needed to build and ship a project. At some point, you may want to execute a task that is not covered by a compiler or CMake’s functionality. Common tasks include archiving build artifacts, creating hashes to verify downloads, or generating or customizing input files for a build. There are also lots of other specialized tasks that depend on the environment that certain software is built in.

In this chapter, we will learn how to include such custom tasks in a CMake project and how to create custom build targets and custom commands. We will go over how to create and manage dependencies between targets ...

Get CMake Best Practices - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.