Tutorial for setting up toolchain environment

One of the biggest sources of confusion for new CMake/C++ developers is setting up the environment for their toolchain. Unlike other languages, in C++ the build system + toolchain aren’t intrinsically linked.

Examples of confusion:

The Meson build system covers this topic well enough:

CMake should have a similar tutorial for setting up compiler environment. And honestly the tutorial wouldn’t be that different for CMake, since Meson/CMake both rely on the same types of environments.


Maybe there could even be a command for bootstrapping a project? There are already GitHub projects with templates (like this for example). It doesn’t have to be something as expansive (or opinionated) as those templates, but something like cargo new with some simple configuration options could be nice.