Windows |
Linux(x86/s390x) |
|---|---|
- Installed CMake 3.15.7 or newer.
- Installed Git.
- Install Xcode.
git clone https://github.com/rokoDev/buffer.gitcd buffer- Generate Xcode project:
cmake -GXcode -DCMAKE_TOOLCHAIN_FILE=deps_content/cmake-toolchains/clang.cmake -B $(pwd)/build/Xcode cd build/Xcode- Build unit tests(if you need you can replace
DebugwithRlease):cmake --build . --config Debug - Run unit tests(you must use
Releaseinstead ofDebugif you did so in previous step):ctest -I ,,1 -C Debug --output-on-failure - If you need to open Xcode project run:
cmake --open .
- Install
Visual Studio 2019 git clone https://github.com/rokoDev/buffer.gitcd buffercmake -E make_directory buildcd build- Generate Visual Studio project:
cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=deps_content/cmake-toolchains/clang-cl.cmake .. - Build unit tests(if you need you can replace
DebugwithRlease):cmake --build . --config Debug - Run unit tests(you must use
Releaseinstead ofDebugif you did so in previous step):ctest -I ,,1 -C Debug --output-on-failure - If you need to open Visual Studio project run:
cmake --open .
It is desirable to have installed one of the latest versions of the clang or gcc compilers.
Note: If you use clang compiler you need to set environment variables like so: PATH=/path/to/clang/bin:/path/to/cmake-install/bin:$PATH CC=/path/to/clang/bin/clang CXX=/path/to/clang/bin/clang++ LD_LIBRARY_PATH=/path/to/clang/lib:$LD_LIBRARY_PATH
Then follow this instructions:
- Install
Ninja:apt-get install -y ninja-build git clone https://github.com/rokoDev/buffer.gitcd buffer- Generate Ninja project:
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=deps_content/cmake-toolchains/gnu.cmake -DCMAKE_BUILD_TYPE=Debug -S . -B ./build/Ninja/gnu/Debug(or runcmake -GNinja -DCMAKE_TOOLCHAIN_FILE=deps_content/cmake-toolchains/clang.cmake -DCMAKE_BUILD_TYPE=Debug -S . -B ./build/Ninja/clang/Debugif you use clang compiler) cd build/Ninja/gnu/Debug(or runcd build/Ninja/clang/Debugif you use clang compiler)- Build unit tests:
cmake --build . --config Debug - Run unit tests:
ctest -I ,,1 -C Debug --output-on-failure
Install pre-commit package. For instructions see: pre-commit installation
In order to be able to make commits with proper formatting and other checks you should run this commands after clonning the repo:
cd bufferpre-commit installpre-commit install --hook-type prepare-commit-msg