Modern CMake
View Course Diagram
C++
CMake is a build system generator: it lets you describe how a C++ project should
be built in a portable way, and then generates the build files for a variety of
tools such as Unix Makefiles, Ninja, or Visual Studio projects. This makes it
possible for your code to be configured, compiled and run consistently across
different operating systems, compilers and machines.
This course introduces the basics of CMake. Starting from a simple "hello, world"
executable, you will learn how to write
CMakeLists.txt files, configure and
build a project, structure larger projects across subdirectories, define library
and executable targets, find and link external dependencies, and use features of
the CMake language to make your builds portable and reproducible. It then goes
further, into build presets, fetching dependencies, testing with CTest, and
installing a library so that other projects can find and use it.The course is accompanied by a series of checkpoints, each a small C++ project to
work through, in the
ModernCMakeCourse repository.