From 5e615649da966adf4c67741617283bbe8c6e6e9c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 22 Mar 2023 12:08:12 +0100 Subject: [PATCH] Document how to use sccache action for C/C++ (#28) --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 553c956..d9bb1a4 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,30 @@ For Rust code, the following environment variables should be set: RUSTC_WRAPPER: "sccache" ``` +### C/C++ code + +For C/C++ code, the following environment variables should be set: + +``` + env: + SCCACHE_GHA_ENABLED: "true" +``` + +With cmake, add the following argument: + +``` +-DCMAKE_C_COMPILER_LAUNCHER=sccache +-DCMAKE_CXX_COMPILER_LAUNCHER=sccache +``` + +With configure, call it with: +``` +# With gcc +./configure CC="sccache gcc" CXX=scache gcc" +# With clang +./configure CC="sccache clang" CXX=scache clang" +``` + ## Prepare a new release 1. Update the example in README.md