Skip to content

Math utilities for MicWro engineering projects.

Notifications You must be signed in to change notification settings

Jimreed91/math-utils

 
 

Repository files navigation

Math Utilities

Test Suite Static Analysis Linting & Style

Created By: Michael Wrona

A collection of math utilities for MicWro Engineering projects.

Install Dependencies

sudo apt-get update
sudo apt-get install -y build-essential cmake lcov gdb

Build Instructions

This project gets compiled into a shared library libmathutils.so.

# Create a build folder at the top-level of the repo.
mkdir build/
cd build/

# Here are a few cmake build commands for the project
cmake ..  # automatically builds in debug mode
cmake .. -DCMAKE_BUILD_TYPE=Debug  # explicitly debug build
cmake .. -DCMAKE_BUILD_TYPE=Release  # release build

# compile
make -j

VS Code Build Tasks

VS Code build tasks are configured for this project. They can be run with CTRL+SHIFT+B. Select between debug and release builds.

Running Tests

Unit tests created with Google Test are included in the project.

cd build/
cmake .. && make -j
ctest

Tests Code Coverage (TODO)

Generate a lcov code coverage report with the following commands. NOTE: be sure to Debug build and run all tests.

lcov --base-directory $(pwd) --directory $(pwd)/../ --capture --output-file coverage-results.info &&\

# run tests (debug built)
cd build/
ctest

# generate lcov report
cd ../
lcov --base-directory $(pwd) --directory $(pwd)/../ --capture --output-file coverage-results.info &&\
lcov --remove coverage-results.info '/usr/*' '*/gtest/*' --output-file coverage-results-cleaned.info &&\
genhtml -o coverage-html coverage-results-cleaned.info --legend --title "MathUtils Test Coverage"

Repository

The code repo can be found here.

git clone https://github.com/michaelwro/math-utils.git

About

Math utilities for MicWro engineering projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.5%
  • CMake 4.4%
  • Other 1.1%