1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-16 20:18:07 +00:00
conky/cmake/CCache.cmake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
653 B
CMake
Raw Normal View History

if(NOT USE_CCACHE)
return()
endif()
find_program(CCACHE_COMMAND sccache)
if(CCACHE_COMMAND)
mark_as_advanced(CCACHE_COMMAND)
message(STATUS "Using sccache; disable with '-DUSE_CCACHE=OFF'")
else()
find_program(CCACHE_COMMAND ccache)
if(CCACHE_COMMAND)
mark_as_advanced(CCACHE_COMMAND)
message(STATUS "Using ccache; disable with '-DUSE_CCACHE=OFF'")
else()
message(WARNING "Neither sccache nor ccache found")
return()
endif()
endif()
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_COMMAND}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_COMMAND}")
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_COMMAND}")