Skip to content

ikraduya/CPP-Project-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Project Boilerplate

github CI status

Set-up the minimum project structure and boilerplate code for modern C++ (C++17). Including:

  • Sources, headers, and mains separated in distinct folders
  • CMake for compiling
  • Tests using 'Google tests'
  • CPPLint.cfg to store cpplint configuration
  • .gitignore for C++ project
  • CI using Github Actions

Structure

.
├── CMakeLists.txt
├── app
│   └── main.cpp
├── include
│   └── exampleClass.hpp
├── src
│   └── exampleClass.cpp
└── tests
    ├── CMakeLists.txt
    ├── exampleTest.cpp
    └── anotherTest.cpp

Building using CMake

> cmake -S . -B build -DCMAKE_BUILD_TYPE=[Debug | Release]
> cmake --build build
> cd build
> ./main
> ctest # Run tests

For build type, you must choose between Debug or Release

About

C++ Project Boilerplate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published