Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 2.22 KB

File metadata and controls

71 lines (49 loc) · 2.22 KB

Development

The project uses CMake for managing dependencies, configurations and building. Currently v3.10 is required for this project. In addition, ninja build system is used for development.

Prerequisite

  • CMake v3.25.1
  • Clang (Apple LLVM version 14.0.0 (clang-1400.0.29.202))
  • Xcode v 14.2 (14C18)
  • C++ (c++1z)
  • Ninja
  • Boost v1.81.0 has to be installed and make it visible for CMake
    • boost::dynamic_bitset, as a header only class, is used to benchmarking bit storing

Compile

Clone

This project manages 3rd party dependencies via CMake ExternalProject.

Generate the project files for Ninja and Xcode

  1. Go to the root folder of the project
  2. Prepare folders (build/debug, build/release and build/xcode) an generate project files (Ninja, Xcode) Run ./configure.sh
  3. Run ./build.sh to build in debug mode

Debug build (with Ninja)

  1. Generate the project (with Ninja) cmake -S . -B build/debug -DCMAKE_BUILD_TYPE=Debug -G Ninja
  2. Build the project (all targets) cmake --build build/debug or ./build.sh
  3. Binary files can be found under build/debug

Release build (with Ninja)

  1. Generate the project (with Ninja) cmake -S . -B build/release -DCMAKE_BUILD_TYPE=Release -G Ninja
  2. Build the project (all targets) cmake --build build/release
  3. Binary files can be found under build/release

Of course CMake has various options for project generation that can be used under -G such as:

  • Xcode
  • Unix Makefiles
  • Ninja
  • etc.

Run tests

Tools

  1. Generate the project (with Ninja) cmake -S . -B build/debug -DCMAKE_BUILD_TYPE=Debug -G Ninja
  2. Build the project (all targets) cmake --build build/debug or ./build.sh
  3. Run unit tests with CTest ctest

Run benchmark

Tool: Google benchmark framework (master branch)

⚠️ Always use release configuration for benchmarking

After the project is compiled successfully, the benchmarking app is under build/debug/compressor_benchmark folder where compressor_benchmark runs the predefined tests