-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Minimal CMake
By :
We will start by working through the changes between ch4/part-2 and ch4/part-3 to see what updates are needed to make mc_gol a shared library. The focus will be ch4/part-3/lib/gol/CMakeLists.txt, but we’ll also need to update ch4/part-3/lib/gol/include/minimal-cmake-gol/gol.h and ch4/part-3/app/CMakeLists.txt.
Visual Studio Code – Compare Active File With...
This is a quick reminder to use the Visual Studio Code feature known as Compare Active File With... to see the differences between chapter parts (for example, ch4/part-2/lib/gol/CMakeLists.txt and ch4/part-3/lib/gol/CMakeLists.txt). The diff view makes the changes clear without needing to switch back and forth.
The first difference is the addition of a new option command for mc-gol:
option(MC_GOL_SHARED "Enable shared library (dynamic linking)" OFF)
The CMake option command allows the library user to compile mc-gol as either STATIC or SHARED (it defaults...