Skip to content

Repository files navigation

C++ Conan2 Cmake Template

Minimal template for building applications using modern C++, Conan2 as the dependency manager and CMake as the build system

Important

This template was made & tested on Linux, it is specifically made to be used with Linux + VSCode (or compatible forks)

System Wide Requirements

Warning

This dependency list is based on Fedora's DNF package manager, names may vary across package repository, distro or operating system

  • gcc-c++
  • clang
  • clang-tools-extra
  • cmake
  • ninja-build
  • python3-pip
  • git

Installing Conan2

Conan2 is best installed through the Python package manager PIP

pip install --user conan # or pip install conan

Verifying Depedencies

clang --version
clang-tidy --version
clang-format --version
cmake --version
ninja --version
conan --version

Build

Use the helper scripts to install Conan dependencies, configure CMake, build the project, and refresh the compilation database for clangd.

./build.sh
./build.sh Release

On Windows, use build.bat with the same build type argument.

About

Repository template for a basic modern C++ project with CMake as the build system and Conan2 for dependency management. Tailored towards Linux & VSCode

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages