In this recipe we reuse the code from Recipe 3 in Chapter 4
and fetch and build the Google Test framework
using FetchContent
,
which provides a compact and
versatile module to assemble project dependencies at configure time. For additional insight
and for CMake below 3.11, we will also discuss how to emulate FetchContent
using
ExternalProject_Add
at configure time.