Document how to use sccache action for C/C++ (#28)

This commit is contained in:
Sylvestre Ledru
2023-03-22 12:08:12 +01:00
committed by GitHub
parent 36cc091a25
commit 5e615649da

View File

@@ -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