-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Minimal CMake
By :
Now we’ve been through our first CMakeLists.txt file and are more familiar with build types (configs) and generators, it’s time to look at a real program and see how we can start to evolve it with CMake’s help.
Staying with the book’s sample code, navigate to ch2/part-2 in your terminal and run the commands we’re now intimately familiar with, cmake -B build (feel free to specify a generator of your choosing such as -G "Ninja Multi-Config"), followed by cmake --build build.
After configuring and building, we can run the sample application by typing ./build/Debug/minimal-cmake_game-of-life on macOS and Linux, or build\Debug\minimal-cmake_game-of-life.exe on Windows (for brevity, we’ll use the POSIX path convention from macOS and Linux going forward; this is one reason to recommend using Git Bash from within Terminal on Windows as the experience will be more consistent).
You should see the following printed...