Configuring the Toolchain

Let's learn about focusing on the key settings of the project.

For CMake projects, a toolchain consists of all the tools used in building and running the application—for example, the working environment, the generator, the CMake executable itself, and the compilers.

Imagine what a less-experienced user feels when our build stops with some mysterious compilation and syntax errors. They have to dig into the source code and try to understand what happened. After an hour of debugging, they discover that the correct solution is to update their compiler. Could we provide a better experience for users and check if all of the required functions are present in the compiler before starting the build?

Sure! There are ways to specify these requirements. If the toolchain doesn't support all of the required features, CMake will stop early and show a clear message of what happened, asking the user to step in.

Setting the C++ standard

Get hands-on with 1200+ tech skills courses.