Preface
The software world and the tooling we use to create software are evolving every single day. CMake is no exception here, as after over 20 years of constantly evolving, it can now be considered something of an industry standard when it comes to building C++ applications. But while CMake is very feature-rich and its documentation is very comprehensive, real-world examples and guidelines on how to use the features together are rare. This is where CMake Best Practices jumps in.
Instead of explaining every last detail and feature of CMake, this book contains examples to illustrate how CMake is best for various tasks when building software without covering every single edge case. There are other books for that. The aim of this book is to keep things as simple as possible while covering the recommended best practices for getting things done. The rationale behind this approach is that you don't need to know about all of CMake's capabilities to achieve your everyday tasks.
We will try to explain a concept first and then illustrate it with concrete examples. This way, you will learn by practice and be able to apply that knowledge to your daily work with CMake. Since the audience of this book will be mostly engineers, we have tailored the book's content accordingly. While writing this book, we are software engineers first and then authors. As a result, the content of the book is more practical than theoretical. It is a compendium of carefully selected, proven techniques that you can use in your everyday CMake workflow.
From engineers to engineers, we hope that you enjoy this book.