lokraszewski / c_cmake_template

Template for C CMake projects with unit tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C CMake Template

A template for C project using cmake.

Motivation

Make bootstrapping a C project easier.

Prerequisites

Build

mkdir build && cd -
cmake .. && make -j

Unit tests

Unit tests are built on CMocka.

To run tests simply run:

make test

Fuzzing

Fuzzing requires clang compiler:

export CXX=/usr/bin/clang++
export CC=/usr/bin/clang

To build:

mkdir build && cd -
cmake -DFUZZ_TEST=ON .. && make -j 

Then simply run:

./bin/fuzz_my_project

Usage

Press Use this template

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Template for C CMake projects with unit tests

License:MIT License


Languages

Language:CMake 78.8%Language:C 15.9%Language:C++ 5.3%