Skip to content

This is a base cmake project with the basic configuration to build a cross-platform c++ application. Triggers the CI to build and run the tests, and run coverage. Uses conan to install dependencies, Catch2 for testing, and fmt. Format by clang-format

License

spjuanjoc/template_project_cpp

Repository files navigation

Template project for C++

This is a base CMake project with the basic configuration to build a cross-platform c++ application for Linux, OSX, and Windows x64. Triggers the CI to build and run the tests, and run coverage. Uses conan to install dependencies: Catch2 for testing, and fmt. Format with clang-format

System App Status
Linux GH Actions linux
OSX GH Actions macos
Win x64 GH Actions windows

Requirements

  • CMake > 3.12
  • A C++20 compliant compiler

Build

  1. Build in debug mode with tests:

    mkdir build && cd build
    cmake -DCMAKE_MODULE_PATH=$PWD -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=True ..
    cmake --build . --config Debug 
  2. Build with ninja:

    mkdir build && cd build
    cmake -DCMAKE_MODULE_PATH=$PWD -DCMAKE_BUILD_TYPE=Release -G "Ninja" ..
    cmake --build . --config Release

Run tests

ctest -V 

License

About

This is a base cmake project with the basic configuration to build a cross-platform c++ application. Triggers the CI to build and run the tests, and run coverage. Uses conan to install dependencies, Catch2 for testing, and fmt. Format by clang-format

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published