Requirements and prerequisites for a super-build
Super-builds can be structured as a grand build that builds multiple projects or as an in-project submodule that deals with dependencies. Therefore, having the means of acquiring repositories is a must. Fortunately, CMake has stable and established ways of doing so. To name a few,
FetchContent are the most popular CMake modules for dealing with external dependencies. We will be using the
FetchContent CMake module in our examples, since it is cleaner and easier to deal with. Please note that using the means provided by CMake is not a strict requirement but a convenience. A super-build can also be structured by using version control system utilities, such as
git submodule or
git subtree. Since CMake is this book's focal point and Git support for
FetchContent is quite decent, we prefer to utilize it.
That's it for now. Let's continue with learning about building a project that spans multiple code repositories...