Ccache
ccache - a fast compiler cache.
ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++.
ccache는 사용자의 디렉토리에 .ccache
라는 폴더를 생성하여 object 파일을 해싱하여 저장해두고 있습니다. preprocessor를 거친 소스코드를 해슁하여 해당 키와 겹치는 object코드가 있으면 컴파일을 하지 않고 해당 object를 그냥 반환하는 방식입니다.
How to install
Ubuntu에서 설치하는 방법은 아래와 같다.
macOS는 아래와 같다.
Use ccache with CMake
# Configure CCache if available
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)