Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Compilation and installation options

Simon Ninon edited this page Mar 20, 2017 · 4 revisions

Custom installation directory

By default, the make install command will install the library globally in your system (/usr/lib for example).

You can change that location by using a dedicated cmake option:

cmake -DCMAKE_INSTALL_PREFIX=/destination/path ..

Enable logging

By default, all lines of code related to logging are suppressed at the preprocessing step.

This is done to provide higher performance by avoiding the execution of unnecessary lines of code related to logging even though no logger has been configured.

If you wish to enable logging, you have to disable that default behavior by setting the CMake variable LOGGING_ENABLED.

# Enable logging
cmake .. -DLOGGING_ENABLED=1

Custom number of io_service workers

The io_service is multithreaded: multiple workers are in charged of IO operations and call the underlying read and write callbacks.

You can configure the number of workers assigned to the io_service by setting the IO_SERVICE_NB_WORKERS CMake variable.

# Change the number of io_service workers (default value: 1)
cmake .. -DIO_SERVICE_NB_WORKERS=1

Custom Queue Size

TCP Server is initialized is a maximum queue size of incoming connections.

You can configure this queue size by setting the IO_SERVICE_NB_WORKERS CMake variable.

# Change the queue size (default value: 1024)
cmake .. -DIO_SERVICE_NB_WORKERS=1024

Building tests

cmake .. -DBUILD_TESTS=true

Building examples

cmake .. -DBUILD_EXAMPLES=true
Clone this wiki locally