Consolidate build tool settings into 20-build-tools
Merge 20-ninja, 20-sccache into a single file and add BUILDAH_FORMAT=docker for Podman health check support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
de1a4ec6fc
commit
cbc8a0ceea
2 changed files with 11 additions and 8 deletions
|
|
@ -1,12 +1,20 @@
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# Configure C/C++ build tools:
|
# Build tool settings: Ninja/CMake, sccache, Podman/Buildah
|
||||||
# - 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
|
if command -v ninja &>/dev/null; then
|
||||||
export NINJA_STATUS="[%e sec | %p (%u remaining) | %o / sec] "
|
export NINJA_STATUS="[%e sec | %p (%u remaining) | %o / sec] "
|
||||||
export CMAKE_GENERATOR=Ninja
|
export CMAKE_GENERATOR=Ninja
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v ccache &>/dev/null; then
|
if command -v ccache &>/dev/null; then
|
||||||
export CMAKE_C_COMPILER_LAUNCHER=ccache
|
export CMAKE_C_COMPILER_LAUNCHER=ccache
|
||||||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command -v sccache &>/dev/null; then
|
||||||
|
export SCCACHE_CACHE_SIZE="40G"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v podman &>/dev/null; then
|
||||||
|
export BUILDAH_FORMAT=docker
|
||||||
|
fi
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
# shellcheck shell=bash
|
|
||||||
# Configure sccache (shared compilation cache)
|
|
||||||
if command -v sccache &>/dev/null; then
|
|
||||||
export SCCACHE_CACHE_SIZE="40G"
|
|
||||||
fi
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue