Chapter 2: The CMake Language
Writing in the CMake Language is a bit tricky. When you read a CMake listfile for the first time, you may be under the impression that the language in it is so simple that it doesn't require any special training or preparation. What follows is very often a practical attempt to introduce changes and experiment with the code without a thorough understanding of how it works. We programmers are usually very busy and are overly keen to tackle any build-related issues with little investment. We tend to make gut-based changes hoping they just might do the trick. This approach to solving technical problems is called voodoo programming.
The CMake Language appears simple: after we have completed our small addition, fix, or hack, or added a one-liner, we realize that something isn't working. The time spent on debugging is often longer than that spent on actually studying the subject. Luckily, this won't be our fate – because this chapter...