From 62664c4f61d3e774ea15fa64ae24a512e138367a Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Tue, 12 Sep 2023 15:06:34 +0200 Subject: [PATCH] ccache options CMake --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b74b499329..b6e26be2ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,16 @@ endif() include_directories("${PROJECT_SOURCE_DIR}/include") include_directories("${PROJECT_SOURCE_DIR}/common") +# ccache options +file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}" ccache_basedir) +set(ENV{CCACHE_BASEDIR} "${ccache_basedir}") +set(ENV{CCACHE_DIR} "${ccache_basedir}/.ccache") +set(ENV{CCACHE_COMPRESS} "true") +set(ENV{CCACHE_COMPRESSLEVEL} "6") +set(ENV{CCACHE_MAXSIZE} "400M") +if ("${ { matrix.config.cxx } }" STREQUAL "cl") + set(ENV{CCACHE_MAXSIZE} "600M") +endif() # libdnf5 add_subdirectory("common")