Developer cookbook

Clean

$ scons -Q -c

or:

$ scons -Q clean

Build

Build all:

$ scons -Q

Build one module:

$ scons -Q roc_core

Minimal build:

$ scons -Q --disable-openfec --disable-tools --disable-tests --disable-examples --disable-doc

Developer build:

$ scons -Q --enable-werror --enable-debug --sanitizers=all

Tests

Build and run all tests:

$ scons -Q test

Run tests for the specified module:

$ scons -Q test/roc_core

Run tests for the module manually:

$ ./bin/x86_64-pc-linux-gnu/roc-test-core -v

Run single test:

$ ./bin/x86_64-pc-linux-gnu/roc-test-core -v -g array -n empty

Compiler options

Select compiler:

$ scons -Q --compiler=gcc
$ scons -Q --compiler=gcc-4.8
$ scons -Q --compiler=gcc-4.8.5

Select toolchain:

$ scons -Q --host=arm-linux-gnueabihf

Set tools and options manually:

$ scons -Q CXX="..." CXXFLAGS="..." ...

Dependencies

Download and build selected dependencies, then build everything:

$ scons -Q --build-3rdparty=libuv:1.4.2,libunwind,openfec,cpputest

Download and build all dependencies, then build everything:

$ scons -Q --build-3rdparty=all

Documentation

Build all documentation. Requires doxygen, sphinx, and breathe.

$ scons -Q docs

Build specific parts of documentation:

$ scons -Q doxygen
$ scons -Q sphinx

Remove generated documentation:

$ scons -Q cleandocs

Run doxygen manually:

# internal modules
$ cd src/modules
$ doxygen

# public api
$ cd src/lib
$ doxygen

Format code

Format code. Requires clang-format.

$ scons -Q fmt

Linter

Run linter. Requires clang-tidy.

$ scons -Q tidy