Repo for a tutorial on setting up c++ project with cmake and ninja
Requirements: CMake : https://cmake.org/ Ninja : https://ninja-build.org/
- Install **cmake **
- On Mac OS,
brew install cmake
- On Mac OS,
- Install the ninja build system
- On Mac OS,
brew install ninja
- On Mac OS,
- From the root directory of the project, run
mkdir -p build
- Go to newly created directory,
cd build
- Run the cmake command,
cmake -GNinja ..
- Run
ninja
to build the project - Run
./penguin
from build directory to run the project - Run
./test/penguin_test
from build directory to run the tests. - On changes, run
ninja
in the "build" directory.