CinderPeak uses uses Google Test (GTest) for robust unit testing.
The project uses CMake as the primary build system, but alternative build tools like Ninja can also be used seamlessly.
- C++17-compatible compiler, GCC 12+, MSVC (with C++17 enabled), or Clang with C++17 support.
- Build system, CMake (latest stable version recommended) or any compatible C++ toolchain.
Before building, create a separate build directory in the root of the project:
mkdir build
cd buildThis keeps all build artifacts cleanly separated from the source code.
You can customize your build to include examples and/or tests by passing the appropriate flags to CMake.
cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
cmake --build .This will build everything: core library, tests, and example applications.
cmake .. -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF
cmake --build .This builds just the example programs—great for trying out features without running tests.
cmake .. -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=ON
cmake --build .This configuration is ideal for using CinderPeak as a library dependency in other projects.
mkdir buildcd build-
Using NMake :
cmake .. -G "NMake Makefiles" -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
To build the files , run:
nmake -
Using MinGW :
cmake .. -G "MinGW Makefiles" -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
To build the files, run:
mingw32-make
-
Using Visual Studio :
cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON cmake --build .
To build the files, run:
make -j
If you encounter :
'nmake' '-?'
failed with :
no such file or directoryRemove the current build directory
cd ..
rmdir /s buildRecreate the build directory and enter in it.
mkdir build
cd buildNow you can build using another build option.
After building, the compiled binaries can be found in the following directories:
- Examples: build/bin/examples/
- Tests: build/bin/tests/
Make sure GTest is correctly installed or discoverable by CMake.