-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Minimal CMake
By :
When bringing in dependencies, there are often situations where we want to customize exactly what gets built. One of the most common examples is whether to build unit tests or not. Usually, libraries will provide an option to build the tests, with the default set to either on or off (this is something we’ll cover in more detail in Chapter 4, Creating Libraries for FetchContent).
To understand this in a bit more detail, let’s continue to evolve our sample project, the Game of Life implementation introduced in Chapter 2, Hello CMake!.
We are going to bring in another library in addition to timer_lib called as-c-math. This is a linear algebra math library intended for use in 3D applications and games. It also includes a set of 2D operations, which will help to refine our Game of Life implementation.
To introduce the new library, let’s use the now-familiar FetchContent_Declare command to describe where to find it:
FetchContent_Declare...