From 2eee7fef59ab79c8447561118c70791dfd88922e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 14 Oct 2022 23:35:55 +0200 Subject: [PATCH] try to use sccache if available --- debian/rules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/rules b/debian/rules index 4ebc5495..98da633a 100755 --- a/debian/rules +++ b/debian/rules @@ -420,6 +420,12 @@ ifeq ($(shell test -e /tmp/cmake/bin/cmake && echo -n yes),yes) export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/tmp/cmake/bin/ endif +# if sccache is installed in the chroot, use it +ifeq ($(shell test -e ~/sccache && echo -n yes),yes) + export SCCACHE_GCS_KEY_PATH=secret-gcp-storage.json + STAGE_1_CMAKE_EXTRA += -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache +endif + GENERATOR=Ninja # enables cmake build targets like stage2-[target_name]