Skip to content

Commit

Permalink
Document how to use sccache action for C/C++ (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre authored Mar 22, 2023
1 parent 36cc091 commit 5e61564
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e61564

Please sign in to comment.