Chapter Wrap-up

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

We'll cover the following


This chapter opened the door to actual programming with CMake—we're now able to write great, informative comments and invoke built-in commands, and we understand how to correctly provide all kinds of arguments to them. This knowledge alone will help us understand the unusual syntax of CMake listfiles that we may have seen in other projects.

Next, we covered variables in CMake—specifically, how to reference, set, and unset normal, cache, and environment variables. We took a deep dive into how directory and function scopes work, and we discussed the issues (and their workarounds) relating to nested scopes.

Get hands-on with 1200+ tech skills courses.