Chapter 1: Kickstarting CMake
If you're developing software using C++ or C, you have probably heard about CMake before. Over the last 20 years, CMake has evolved into something that's an industry standard when it comes to building C++ applications. But CMake is more than just a build system – it is a build system generator, which means it produces instructions for other build systems such as Makefile, Ninja, Visual Studio, Qt Creator, Android Studio, and Xcode. And it does not stop at building software – CMake also includes features that support installing, packaging, and testing software.
As a de facto industry standard, CMake is a must-know technology for any C++ programmer.
In this chapter, you will get a high-level overview of what CMake is and learn about the necessary basics to build your first program. We will have a look at CMake's build process and provide an overview of how to use the CMake language to configure build processes.
In this chapter, we will cover the following topics:
- CMake in a nutshell
- Installing CMake
- The CMake build process
- Writing CMake files
- Different toolchains and build configurations
Let's begin!