Skip to content

Commit 0a7c4ff

Browse files
TrottBethGriggs
authored andcommittedNov 24, 2021
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 5593dd1 commit 0a7c4ff

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
@@ -525,22 +525,18 @@ installing `ccache` can help to greatly reduce build times. Set up with:
525525

526526
On GNU/Linux:
527527

528-
```console
529-
$ sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros
530-
$ ccache -o cache_dir=<tmp_dir>
531-
$ ccache -o max_size=5.0G
532-
$ export CC="ccache gcc" # add to your .profile
533-
$ export CXX="ccache g++" # add to your .profile
528+
```bash
529+
sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros
530+
export CC="ccache gcc" # add to your .profile
531+
export CXX="ccache g++" # add to your .profile
534532
```
535533

536534
On macOS:
537535

538-
```console
539-
$ brew install ccache # see https://brew.sh
540-
$ ccache -o cache_dir=<tmp_dir>
541-
$ ccache -o max_size=5.0G
542-
$ export CC="ccache cc" # add to ~/.zshrc or other shell config file
543-
$ export CXX="ccache c++" # add to ~/.zshrc or other shell config file
536+
```bash
537+
brew install ccache # see https://brew.sh
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
544540
```
545541

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

0 commit comments

Comments
 (0)
Please sign in to comment.