If you want stack tracing, install libunwind
:
apt-get install binutils-dev
# Create build folder and cd into it
mkdir build
cd build
# Create Makefiles using CMake:
cmake ../src
# Build
make -j 10
- If you use
clangd
, you can symlinkbuild/compile_commands.json
tosrc
directory.
ln -s ../build/compile_commands.json
- To enable stack tracing, build like this:
# Get backward-cpp submodule
git submodule update --init --recursive
# Get "libunwind"
apt-get install binutils-dev
Then build using the following CMake flags:
cmake -DCMAKE_BUILD_TYPE=Debug ../src
# Move to src directory
cd src
# Run make
make -j 10