Using ccache

GCC-like compilers only

Tested on GCC and Clang.

Introduction

ccache speeds up compilation times by caching object files and reusing them on subsequent builds. This even works for complete rebuilds (i.e. deleting the full build-directory). If ccache is found on the system it is automatically used.

Configuration

Add the following line to your ccache config file which is required for pre-compiled headers:

sloppiness = pch_defines,time_macros

See the ccache docs for other available options.

ccache and Clang

Set the option run_second_cpp = true or export CCACHE_CPP2=true to suppress lots of false positive compiler warnings.

Usage on eve

Just load the module:

module load /global/apps/modulefiles/ccache/3.3.3

This article was written by Lars Bilke. If you are missing something or you find an error please let us know. Generated with Hugo 0.54.0. Last revision: May 17, 2019
Commit: [web] Added note on using the EasyBuild modules on eve. ed26f7726  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum