Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.52 KB

File metadata and controls

53 lines (35 loc) · 1.52 KB

Dev notes

Here you can find the necessery information to be able to work on the project


Building and Testing

Note

The project uses doctest framework for unit testing, however it is already installed in the tests/external directory, so there is no need to install it sepparately.

Build the testing executables

cmake -B build -DBUILD_TESTS=ON
cmake --build build # -j<n>

This will build the test executables gl (GL module tests) and hgl (HGL module tests) in the <project-root>/build/tests directory.

Run the tests

./build/tests/gl  # -ts=<test-suite-name>
./build/tests/hgl # -ts=<test-suite-name>

Note

Test suites in the project have the same names as the files they're in except for the test_extarnal_libs_config.cpp file which defines the test_doctest_config test suite.


Formatting

Note

The project uses clang-format-18 which is natively available on the Ubuntu-24.04 LTS system.

If the llvm-18 toolchain isn't available on your system, the installation instructions can be found on the llvm apt page. After installing the toolchain run sudo apt install clang-format-18.

You can format the code manually using clang-format-18 or you can use the prepared python script:

python scripts/format.py

To inspect the all script's options and usage run:

python scripts/format.py --help

Note

The script requires python >= 3.9