Introduction
Let's learn about the needs of the target in CMake.
We'll cover the following
The most basic target we can build in CMake is a single binary executable file that encompasses an entire application. It can be made out of a single piece of source code, such as the classic helloworld.cpp
. Or it can be complex—built with hundreds or even tens of thousands of files. This is what many beginner projects look like: create a binary with one source file, add another, and, before you know it, everything is linked to a single binary without any structure whatsoever.
Purpose of project partitioning
As software developers, we deliberately draw boundaries and designate components to group one or more units of translation (.cpp
files). We do it for multiple reasons:
Get hands-on with 1200+ tech skills courses.