Pang-GJ / cpp-project-template

a tiny cpp project template. (There is another complex project template in the "complex" branch.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tiny C++ Project Template

This is a tiny C++ project template using xmake.

The requirements are:

  • xmake
  • A C++17 compatible compiler (doctest needed!).
  • fmt (just I like it...)
  • spdlog (awesome log library)
  • doctest (test needed)
  • clang-format (optional)
  • clang-tidy (optional)

How To Use ?

To generate compile_commands.json (clangd needed):

xmake project -k compile_commands

To build:

# build all
xmake build
# build target
xmake build <target>

To run:

xmake run <target>

To test:

xmake run <test-target>

To clang-format:

xmake format

About

a tiny cpp project template. (There is another complex project template in the "complex" branch.)


Languages

Language:Python 88.0%Language:Lua 6.8%Language:C++ 3.4%Language:Shell 1.7%