rdong8 / learn_asio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cpp_project

Template for a modern C++ project using CMake.

Clone

git clone --recurse-submodules https://github.com/rdong8/cpp_project.git
cd cpp_project/

Dependencies

System

make system-deps

Python

First ensure you have pyenv and pyenv-virtualenv installed. Then:

make py-deps

Conan

If you haven't already, create a conan profile, which can be done with:

make conan-profile

Then install the project's C++ dependencies with Conan:

make conan-deps

Configure

Either run:

make cmake-config

or create a CMake profile in CLion with the following settings:

  • Name: Debug
  • Build type: Debug
  • Toolchain: Use Default
  • Generator: Ninja Multi-Config
  • CMake options:
    -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=build/Debug/generators/conan_toolchain.cmake
    
  • Build directory: build/
  • Build options: empty
  • Environment: empty

Build

make build

The cpp_project executable will be in build/src/Debug/.

Run

make run

Test

make test

Documentation

make docs

The documentation will be under build/docs/html/.

Pre-Commit

While developing, you may want to have some tasks automatically run with pre-commit.

make pre-commit

About


Languages

Language:CMake 55.5%Language:C++ 32.3%Language:Makefile 8.0%Language:Python 4.3%