Skip to content
/ ModernCppStarter Public template

Kick-start your C++! A template for modern C++ projects using XMake, CI, code coverage, clang-format, reproducible dependency management and more.

License

Notifications You must be signed in to change notification settings

yunshouhu/ModernCppStarter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModernCppStarter

Setting up a new C++ project usually requires a significant amount of preparation and boilerplate code, even more so for modern C++ projects with tests, executables and contiguous integration. This template is the result of learnings from many previous projects and should help reduce the work required to setup up a modern C++ project.

Features

Usage

Adjust the template to your needs

  • Use this repo as a template and replace all occurrences of "Greeter" in the relevant xmake.lua with the name of your project
  • Replace the source files with your own
  • For single-header libraries: see the comments in xmake.lua
  • Happy coding!

Eventually, you can remove any unused files, such as the standalone directory or irrelevant github workflows for your project. Feel free to replace the License with one suited for your project.

Build and run the standalone target

Use the following command to build and run the executable target.

xmake 
xmake run
xmake run standalone --help

Build and run test suite

Use the following commands from the project's root directory to run the test suite.

xmake build test
xmake run test

To collect code coverage information, run:

xmake f -m coverage
xmake build test
xmake run test

About

Kick-start your C++! A template for modern C++ projects using XMake, CI, code coverage, clang-format, reproducible dependency management and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages