- Implemented in
C++20
and only uses C++ Standard Library. CMake 3.12
or higher.- GNU/Linux:
GCC 10.1
or higher,Clang 11
or higher. - Windows:
Visual Studio 2019 version 16.11.14
or higher. - macOS:
Xcode 14.3
or higher.
To use the library, simply clone the repository or download the bytepack.hpp
file and include it in your project.
git clone https://github.com/farukeryilmaz/bytepack.git
Include the library in your C++ project:
#include "bytepack/bytepack.hpp"
Clone the repository with submodule Catch2 v2.x
to run tests:
git clone --recursive https://github.com/farukeryilmaz/bytepack.git
If you cloned non-recursively previously, use
git submodule update --init
to clone the necessary submodules.
You can generate Visual Studio Solution (.sln) with CMake and run the test on Visual Studio:
Run cmake command under project folder. It generates BytePack.sln file under build folder.
- Visual Studio 2022 version 17:
cmake -S . -B build -G "Visual Studio 17 2022" -DBYTEPACK_BUILD_TESTS=ON
- Visual Studio 2019 version 16:
cmake -S . -B build -G "Visual Studio 16 2019" -DBYTEPACK_BUILD_TESTS=ON
Or you can directly run test using CMake with MSVC:
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DBYTEPACK_BUILD_TESTS=ON
cmake --build build --config Release
cd build
ctest -C Release
To disable building tests, replace
-DBYTEPACK_BUILD_TESTS=ON
with-DBYTEPACK_BUILD_TESTS=OFF
cmake -S . -B build -DBYTEPACK_BUILD_TESTS=ON
cmake --build build
cd build
ctest
Use
-DBYTEPACK_BUILD_TESTS=OFF
in the cmake command to skip building tests.