Skip to content

Commit 4e1475c

Browse files
committed
Add instructions on how to accelerate local builds
1 parent 7296e48 commit 4e1475c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README_DEVELOPERS.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,33 @@ LD_LIBRARY_PATH=/usr/local/lib pytest
3838

3939
That's it! You can now proceed to the testing section.
4040

41+
### Speeding up local builds (sccache + Ninja)
42+
43+
If you do frequent local rebuilds, sccache can significantly speed up C/C++ rebuilds.
44+
45+
```bash
46+
brew install sccache ninja
47+
```
48+
49+
Then run:
50+
51+
```bash
52+
CMAKE_GENERATOR=Ninja \
53+
CMAKE_C_COMPILER=clang \
54+
CMAKE_CXX_COMPILER=clang++ \
55+
CMAKE_C_COMPILER_LAUNCHER=sccache \
56+
CMAKE_CXX_COMPILER_LAUNCHER=sccache \
57+
CMAKE_BUILD_PARALLEL_LEVEL=8 \
58+
SKBUILD_PARALLEL_LEVEL=8 \
59+
pip install -e .
60+
```
61+
62+
Check cache stats with:
63+
64+
```bash
65+
sccache --show-stats
66+
```
67+
4168
## Testing
4269

4370
We are using pytest for testing. You can run the tests by executing

0 commit comments

Comments
 (0)