From 5fcf9e163a4657ee990fc3acacf851c8fb784cfc Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 25 Sep 2024 10:21:02 -0400 Subject: [PATCH] [ci] try ccaching --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb714ec9..86384d4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,6 +164,15 @@ if( BTAS_USE_BLAS_LAPACK ) endif() include(external/boost.cmake) +# optional dependency: ccache +find_program(CCACHE ccache) +if(CCACHE) + mark_as_advanced(CCACHE) + message (STATUS "Found ccache: ${CCACHE}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE}" CACHE STRING "Compiler launcher to use for compiling C++") + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE}" CACHE STRING "Compiler launcher to use for compiling C") +endif(CCACHE) + ########################## # configure BTAS_ASSERT ##########################