This build will work on all platforms that I will be testing on.
There will be to main builds we will use:
First make a build directory under the main directory, and cd into it.
The release build will be our main build for benchmarking. It is compiled with “-O2 -DNDEBUG -rdynamic”.
cmake ../ -DCMAKE_BUILD_TYPE=Release
This is our profiling and debugging build. The -fno-inline ensures that the compiler will not inline the function we are targeting. This ensures that perf will be able to see the function.
cmake ../ -DCMAKE_CXX_FLAGS="-O2 -DNDEBUG -rdynamic -fno-inline -g" -DCMAKE_VERBOSE_MAKEFILE="true"
After cmake we will run make
Testing the build:
In order to test that the build worked we will rum the test executable.
After running the tests and benchmarks we should see “All tests passed”. This means we have a good build of the software.
The other thing required to run a build is copying the test data folder into the build directory.
When I want to do a clean build I run
rm -r CMakeFiles
Inside the build directory.
This leaves the testdata directory intact for the next build
Test data is provided with the software package, and tests all the data this compressor will see.
This compressor is designed to get large amounts of data in a variety of formats such as text, HTML, PDF, and JPEG. This compressor is designed to be able to recognize already compressed data and skip it. This test data is large and comprehensive. I am confident it is enough to test all parts of the program.
The unit test also runs a number of benchmarks, which will be sufficient to test if there is a improvement in the code.