Skip to content

How to build g3log?

junwufan edited this page Aug 24, 2021 · 1 revision

G3log is an asynchronous, "crash safe", logger that is easy to use with default logging sinks or you can add your own. G3log is made with plain C++14 (C++11 support up to release 1.3.2) with no external libraries...

Example of building debug g3log, shared library. ref Options.cmake

git clone https://github.com/KjellKod/g3log.git
cd g3log
mkdir build
cd build
cmake -DCMAKE_DEBUG_POSTFIX=d -DUSE_DYNAMIC_LOGGING_LEVELS=ON -DCMAKE_INSTALL_PREFIX=../../../v/g3log ..
cmake --build . --target install

Building the release

cmake --build . --config Release --target install

Example of building release g3log, static library

git clone https://github.com/KjellKod/g3log.git
cd g3log
mkdir build
cd build
cmake -DG3_SHARED_LIB=OFF -DCMAKE_INSTALL_PREFIX=../../../v/g3log ..
cmake --build . --config Release --target install