diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d6a35bb..c68dafca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,12 @@ set(BUILD_SHARED_LIBS True) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +find_program(CCACHE_PROGRAM "ccache") +if (CCACHE_PROGRAM) + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") +endif() + # include headers of ${library} to ${target} function(banan_include_headers target library) target_include_directories(${target} PUBLIC $/include)