Skip to content

FeignClaims/cpp_conan_template

Repository files navigation

cpp_conan_template

ci codecov CodeQL

Write your own conan profile and conanfile, then use cmake with the generated toochians.

⚠️ support for docker images dose NOT complete yet!

About cpp_conan_template

This is a cmake template using conan 2.0 for setting up and running with C++ quickly.

This repository highly depends on aminya/project_options, which improves the CMake experience a lot.

It includes:

  • a basic example on how to manage dependencies using conan and use it simply
  • an example github action testing working on Linux/MacOS/Windows
  • examples for testing using catchorg/Catch2

It requires:

  • cmake 3.25+
  • conan 2.0.15+
  • a C++ compiler that supports C++20.
  • (optional) ccache
  • (optional) clang-tidy
  • (optional) clang-format
  • (optional) cppcheck

Getting Started

Use the Github template

First, click the green Use this template button near the top of this page. This will take you to Github's 'Generate Repository' page. Fill in a repository name and short description, and click 'Create repository from template'. This will allow you to create a new repository in your Github account, prepopulated with the contents of this project.

Now you can clone the project locally and get to work!

git clone https://github.com/<user>/<your_new_repo>.git

Docs

More Details

This repository highly depends on aminya/project_options, which improves the CMake experience a lot.

I learnt CMake from scrach using Modern CMake for C++.

For conan 2.0, here is the official documentation.