Porting of the original thunder project in Modern C++ (C++17). A data manipulation library for C++
Alberto Carli VR473845 Aleardo Lodi VR463652
A few dependancies are needed to build:
libpng
jpeglib
libtiff
On linux you could install those by simply running
sudo apt install libpng-dev jpeglib-dev libtiff-dev
Use cmake
>= 3.23.3 to build the project, simply launch
mkdir build
cmake -S . -B build
Your executable will be in the bin folder.
Available targets to make in build folder:
install
: Builds executable in bin folderThundercpp
: Build target thunderdoc
: Creates adoc
directory containing the HTML documentationclean_all
: Clean the project from thebin
anddoc
directories.
Example usage:
make -C build install
make -C build Thundercpp
make -C build doc
To compile in debug mode the following programs will need to be available on the system:
lcov
clang-tools
valgrind
clang-tidy
lizard
by using
sudo apt install lcov clang-tools valgrind clang-tidy
sudo pip install lizard
Optionally clang-tidy and clang-format can be downloaded to be used on the code with the proper make target
If -DCMAKE_BUILD_TYPE=Debug
is specified while building the makefile, like so
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
the following targets will be available:
test_Thundercpp
: Compiles test programscoverage
: Executes tests to calculate coverage. Results are in doc/coverage folder in html formatvalgrind
: Runs valgrind to check memory leakagescan_build
(static analyzer): Runs a static analysis for bugs with scan_buildlizard
(cyclomatic complexity): Runs lizard and prints cyclomatic complexity datalinter
(clang-tidy): Applies clang-tidy to the header filesformat
: Applies clang-format to project
sanitizers are automatically added to compile options:
- -fsanitize=address
- -fsanitize=undefined
- -fno-sanitize-recover=all
- -fsanitize=float-divide-by-zero
- -fsanitize=float-cast-overflow
- -fno-sanitize=null
- -fno-sanitize=alignment
- -fno-omit-frame-pointer
Example usage:
make test_Thundercpp
make coverage
make format