diff --git a/20-ninja b/20-build-tools similarity index 57% rename from 20-ninja rename to 20-build-tools index 5f82b3a..17720ea 100755 --- a/20-ninja +++ b/20-build-tools @@ -1,12 +1,20 @@ # 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 +# Build tool settings: Ninja/CMake, sccache, Podman/Buildah + 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 + +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 diff --git a/20-sccache b/20-sccache deleted file mode 100755 index 1f98288..0000000 --- a/20-sccache +++ /dev/null @@ -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