Instructions for installation of this software (includes profiling, linting, building, and unit testing):
- Install Valgrind (profiling, memory checks, memory leaks etc.)
$ sudo apt install valgrind
- Install Cmake/Makefile (build tools)
$ sudo apt install cmake
- Install Google Test (unit testing) - See this tutorial for tutorial on using Google Test library
$ sudo apt install libgtest-dev $ cd /usr/src/gtest $ sudo cmake CMakeLists.txt $ sudo make $ sudo cp *.a /usr/lib
- Install Cppcheck (linting)
$ sudo apt install cppcheck
- Configure the code for usage (modify direct_fourier_transform.c config)
- Build direct fourier transform project (from project folder)
$ mkdir build && cd build $ cmake .. -DCMAKE_BUILD_TYPE=Debug && make
To perform memory checking, memory leak analysis, and profiling using Valgrind, execute the following (assumes you are in the appropriate build folder (see step 5 above):
$ valgrind --leak-check=yes -v ./dft
$ valgrind --leak-check=yes -v ./tests
To execute linting, execute the following commands (assumes you are in the appropriate source code folder):
$ cppcheck --enable=all main.cpp
$ cppcheck --enable=all direct_fourier_transform.c
$ cppcheck --enable=all unit_testing.cpp
To execute unit testing, execute the following (also assumes appropriate build folder):
$ ./tests
To execute the direct fourier transform (once configured and built), execute the following command (also assumes appropriate build folder):
$ ./dft