2026-03-06 11:57:24 +01:00
|
|
|
# shellcheck shell=bash
|
2026-03-06 12:05:05 +01:00
|
|
|
# Configure C/C++ build tools:
|
|
|
|
|
# - Use Ninja instead of Make for CMake builds (faster parallel builds)
|
|
|
|
|
# - Use ccache to cache compilations and speed up rebuilds
|
2026-03-06 11:57:24 +01:00
|
|
|
if command -v ninja &>/dev/null; then
|
|
|
|
|
export NINJA_STATUS="[%e sec | %p (%u remaining) | %o / sec] "
|
|
|
|
|
export CMAKE_GENERATOR=Ninja
|
|
|
|
|
fi
|
|
|
|
|
if command -v ccache &>/dev/null; then
|
|
|
|
|
export CMAKE_C_COMPILER_LAUNCHER=ccache
|
|
|
|
|
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
|
|
|
|
fi
|