A template for C and CPP programming that makes use of the cmocka unit testing framework in addition to the CMAKE build system. It's focused on wide compatibility with multiple systems and setup for vim usage.
Find a file Use this template
2024-03-08 10:42:31 -08:00
.template_files changed todays_year --> todays_date 2024-03-08 10:29:02 -08:00
build
cmake/cmocka removed the cmocka repo dir, added a cmocka dir with cmake files 2024-03-08 10:28:47 -08:00
docs
inc
src removed the PUBLIC keyword, not needed. 2024-03-08 10:35:58 -08:00
tests removed more old refences to other project 2024-03-08 10:33:50 -08:00
toolchains
.gitignore added the clangd index to ignored stuff. 2024-03-08 10:42:31 -08:00
CMakeLists.txt chagned the standard to C17 and CXX17 2024-03-08 10:28:24 -08:00
Doxyfile
LICENSE
otto.sh fixed the older camera_handler refernces 2024-03-08 10:28:13 -08:00
README.md
setup.sh

cmake-cmocka-template

A template for C and CPP programming that makes use of the cmocka unit testing framework in addition to the CMAKE build system.

Requirements

Resources

Documentation

Documentation genreation is handled with Doxygen.

Building documentation

doxygen ./Doxyfile
# Magic happens
ls ./docs

And that's it.

Contributions

Directory Overview

It's focused on wide compatibility with multiple systems and setup for vim usage..

tree -L 2 ./
├── build
├── CMakeLists.txt
├── docs
├── inc
├── LICENSE
├── README.md
├── setup.sh
├── src
│   ├── CMakeLists.txt
│   └── main.c
├── otto.sh
└── tests
    └── CMakeLists.txt

5 directories, 8 files

Scripts

There are two scripts setup inside the project directory:

otto.sh Uesd to preform the needed commands to build, test and debug the project.

Adding a new module

To add a new section of code:

  1. run the otto.sh script: ./otto.sh
  2. Select option 5
  3. Enter the modules name.

To remove a module:

  1. run the otto.sh script: ./otto.sh
  2. Select option 6
  3. Enter the modules name.

setup.sh Used to install the projects dependencies and automate needed setup. Also removes example code when requested.