bash.d/20-ninja
Ole-Morten Duesund 0791d74b0d Add descriptive comments to all scripts
Each file now has a brief comment explaining what the tool is and
what the script does, aimed at someone with general Linux knowledge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:05:05 +01:00

12 lines
459 B
Text
Executable file

# shellcheck shell=bash
# 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
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