Chapter Wrap-up

Let's see what you've learned in this chapter and test your understanding of targets.

We'll cover the following

Summary

Understanding targets is critical to writing clean, modern CMake projects. We not only discussed what constitutes a target and how targets depend on each other but also how to present that information in a diagram using the Graphviz module. With this general understanding, we learned about the key feature of targets: properties (all kinds of properties). We not only went through a few commands to set regular properties on targets; we also solved the mystery of transitive usage requirements or propagated properties. This was a hard one to solve, as we not only needed to control which properties get propagated but also how to reliably propagate them to selected further targets. Furthermore, we discovered how to guarantee that those propagated properties are compatible when they arrive from multiple sources.

Get hands-on with 1400+ tech skills courses.