Preface
The software world and the tooling we use to create software are evolving every single day. CMake is no exception; over the past twenty years, it has continually evolved and is now considered an industry standard for building C++ applications. Despite CMake’s extensive features and comprehensive documentation, real-world examples and guidelines on how to effectively use these features together are rare. This is where CMake Best Practices steps in.
Rather than delving into every detail and feature of CMake, this book provides examples to illustrate how CMake can be used effectively for various tasks in building software, without covering every single edge case—other books serve that purpose. 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 all of CMake’s capabilities to accomplish your everyday tasks.
We tried to illustrate all concepts with concrete examples, that you can try out yourself. Since the audience of this book is primarily engineers, we have tailored the content accordingly. While writing this book, we are software engineers first and authors second. As a result, the content 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 you enjoy this book.