Skip to content

A capable template for C++ projects using CI, Building, Testing, Formatting, Documenting and more

License

Notifications You must be signed in to change notification settings

dimanikulin/capable-cpp-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Your Logo

GitHub contributors GitHub followers Commit activity Last commit
GitHub release (latest by date including pre-releases) GitHub all releases GitHub Release Date
Main flow GitHub code size in bytes GitHub repo size
GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests
GitHub Discussions License

Quick Links

Description

A template for C++ projects featuring CI, building, testing, formatting, documentation, and more.

Designed as a starting point with a wide range of features that can be easily included or excluded based on your needs.

This template reflects my personal approach, so you may have different preferences regarding its implementation.

Any feedback is greatly appreciated!

Features

# Feature CI support Description
License N/A Fully open license. The project is licensed under the Unlicense
MD templates N/A Attractive main README (Logo, Badges, Quick Links, Tables, Diagrams)
Building Yes Build with Ninja and CMake, Use of Ccache to speed up the builds
Testing Yes Unit testing with GoogleTest and CTests (with an option to enable testing), uploading test results to GitHub
Packaging Yes Stripping binaries, ziping by 7xip, uploading binaries to GitHub
CI Yes Using GitHub Actions CI workflows for Windows, Linux and MacOS operation systems
gitignore N/A Uses well known ignore file from

What is important - you can disable the things you don't use.

Initialization

There are two ways to install the project:

If you would like to clone the repository please run:

git clone https://github.com/dimanikulin/capable-cpp-template/

Readme.md

You need to provide an icon at ./resources/icons/main.png if you wish to include an icon in this README file.

Update the href in badges to point to your repository (note: the repository must be public to use badges)

GitHub supports Mermaid.js for creating diagrams, such as:

flowchart LR
    B -->|Multimedia data| C(Online Multimedia IR system)
    B -->|Multimedia data| D(Offline Multimedia IR system)
    A(Photo Album owner) --> B(FVA Solution)
    A(Photo Album owner) --> D1
    A(Photo Album owner) --> D2
    A(Photo Album owner) --> D3
    D1(fa:fa-tablet Tablet) -->|Multimedia data| B(FVA Solution)
    D2(fa:fa-phone Phone) -->|Multimedia data| B(FVA Solution)
    D3(fa:fa-hdd-o External Disk) -->|Multimedia data| B(FVA Solution)
Loading

Building

Then please update "Project" in CMakeLists.txt

project(
  "Project"
  VERSION 0.1.0
  LANGUAGES CXX
)

with your project name.

Building

To build the project you will need to run CMake routine like to the one below:

mkdir build/ && cd build/
cmake --build . 

You can build it locally and in a CI environment.

Testing

The template uses Google Test for unit testing. Unit testing is enabled by default via the BUILD_TESTS option. To run tests, use CTest from the build directory:

cd build          
ctest -C Release

Tests can be executed both locally and in a CI environment.

Packaging

TBD

Coming features

  • Documentation with Doxygen and README support (CI and local)
  • Publish documentation on GitHub Pages
  • QT support (CI and local)
  • Contribution guidelines, issue templates, and pull request templates
  • Clang-Format configuration
  • CMake formatting
  • Static analysis tools
  • Code coverage reports
  • Package manager support
  • Windows package creation using WiX
  • GoogleMock integration
  • Python formatting and linting
  • Cross-compilation

Formatting

TBD

Static analyzers

TBD

Code coverage

TBD

Using QT

TBD Qt-oriented static code analyzer based on the Clang framework

Documentation

TBD

Contributing

TBD

Author

Dmytro Nikulin

License

This project is licensed under the Unlicense - see the LICENSE file for details


Made with Markdown