Skip to content

Commit 5e2d0ed

Browse files
Trotttargos
authored andcommitted
doc: simplify ccache instructions
`ccache` has reasonable defaults for `max_size` and `cache_dir` so remove instructions to set those things explicitly. Change fenced code from `console` to `bash` for easier copy/paste. PR-URL: #40550 Fixes: #40542 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent c1c1738 commit 5e2d0ed

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

BUILDING.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -521,22 +521,18 @@ installing `ccache` can help to greatly reduce build times. Set up with:
521521

522522
On GNU/Linux:
523523

524-
```console
525-
$ sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros
526-
$ ccache -o cache_dir=<tmp_dir>
527-
$ ccache -o max_size=5.0G
528-
$ export CC="ccache gcc" # add to your .profile
529-
$ export CXX="ccache g++" # add to your .profile
524+
```bash
525+
sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros
526+
export CC="ccache gcc" # add to your .profile
527+
export CXX="ccache g++" # add to your .profile
530528
```
531529

532530
On macOS:
533531

534-
```console
535-
$ brew install ccache # see https://brew.sh
536-
$ ccache -o cache_dir=<tmp_dir>
537-
$ ccache -o max_size=5.0G
538-
$ export CC="ccache cc" # add to ~/.zshrc or other shell config file
539-
$ export CXX="ccache c++" # add to ~/.zshrc or other shell config file
532+
```bash
533+
brew install ccache # see https://brew.sh
534+
export CC="ccache cc" # add to ~/.zshrc or other shell config file
535+
export CXX="ccache c++" # add to ~/.zshrc or other shell config file
540536
```
541537

542538
This will allow for near-instantaneous rebuilds even when switching branches.

0 commit comments

Comments
 (0)