Skip to content

Building the project locally

<- to README.md

Building the project

Prerequisites

This project uses CMake with presets as a main way of managing platform-dependent configuration.

Since using the tool in question inherently requires an installation of clang++, it is usually built with same compiler using clang preset. Other toolchains are also supported through msvc and gcc presets.

On most systems LLVM provides both system packages and an automatic install script:

wget https://apt.llvm.org/llvm.sh &&
chmod +x llvm.sh                  &&
sudo ./llvm.sh all

For Windows, both cmake and clang++ toolchain can be set up through Visual Studio Installer.

Building

Clone the repo:

git clone https://github.com/DmitriBogdanov/clang-build-profiler.git &&
cd "clang-build-profiler/"

Configure CMake:

cmake --preset=clang

Build the project:

cmake --build --preset=clang

The binary can be found at build/clang-build-profiler.

Building the docs

Prerequisites

This repo uses MkDocs with Material theme to build the website version of documentation.

python3 can be downloaded from the official website or using a package manager:

sudo apt update && sudo apt install python3

After this, to install necessary dependencies run:

pip install mkdocs-material mkdocs-material[imaging] markdown-callouts

Building

To build the documentation locally and view it immediately run:

mkdocs serve --open

To build a version for distribution run:

mkdocs build