Skip to content

kitswas/CPP-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

efe9be4 · Jan 27, 2025

History

68 Commits
Jan 27, 2025
Oct 3, 2022
Oct 3, 2022
Jan 27, 2025
Jan 27, 2025
Nov 2, 2022
Oct 11, 2024
Dec 12, 2022
Aug 7, 2024
Jan 27, 2025
Jan 27, 2025
Nov 3, 2022
Oct 7, 2024

Repository files navigation

C-Plus-Plus Project Template

This repository is a template I made and personally use to bootstrap my C and C++ projects.

Feel free to use it. It's licenced under Unlicence.
You will probably want to change the licence after you clone this, though.

Setting up your workspace

This project has a .editorconfig file to enforce project level coding standards.
CLion has built-in support, VSCode requires a plugin.

How to run

This project requires CMake to build. Your IDE (VSCode or CLion) should automatically detect the CMakeLists.txt file and build the project. Install extensions for CMake support if prompted.
If you are using the command line, you can run the following commands:

cmake -B build
cmake --build build --config Debug

Then execute the following commands to run the program:

Windows:

.\build\executable

Linux:

./build/executable

Generating and Viewing Documentation

This project uses Doxygen to generate documentation.
If Doxygen is available on your system,
You can generate the documentation by running the doc CMake target.

cmake -B build
cmake --build build --target doc

To get graphs in the documentation, you will need to install Graphviz.
Set the HAVE_DOT option in the Doxyfile to NO if you do not have Graphviz installed.

This repository also has an automated workflow to generate documentatation via Github Actions.

The generated documentation can be viewed at /docs. Documentation is auto-generated and deployed to Github Pages.
Disable Actions on your own copy or delete the workflows folder if you do not want to be billed. This is not my responsiblity.