This repo is a collection of C++ tools which I created myself to facilitate my C++ development process.
- cpp-styleguide, based on personal preferences
- hppmerge, to resolve includes in a header or source file
- build-scripts, using premake5
- for console-app development
- for library development
This styleguide is based on personal preferences and is inspired by google's styleguide.
Currently featured contents are
- naming conventions
- comments
- formatting
Python script to resolve includes in a C++ header or source file
This project allows you to resolve include dependencies in your header or source files. A usecase for this would be if you want to distribute your C++ project using a single-include header file.
Important
The output file with the resolved includes will have all multi-line comments removed.
Execute the following command in your console.
python3 path/to/hppmerge.py ORIGIN DEST --default DEFAULT --ignore IGNOREORIGIN= the path to your header / source file you want to resolve the includes inDEST= the desired path of the output fileDEFAULT(optional) = all default include directories that your compiler is using (seperated by whitespace)IGNORE(optional) = all filepaths (glob) hppmerge should not resolve (seperated by whitespace)
Use the following scripts
- for console-app development
- for library development
It is recommended to put the respective script in a subdirectory, e.g. /build.
The script is processed by premake5.
Additionally, you need
- make for linux development
- visual studio for windows development
Execute the following command in your console
premake5 path/to/script.lua gmake && makeif you're using linux or
premake5 path/to/script.lua vs2022and navigate visual studio if you're using windows.