Look for sccache in $HOME/.cargo

This commit is contained in:
Jesse Talavera-Greenberg 2023-08-14 23:07:05 -04:00
parent cbad3d0db9
commit c1a614b4c1

View File

@ -17,11 +17,13 @@ set(OPENGL_PROFILE ${DEFAULT_OPENGL_PROFILE} CACHE STRING "OpenGL profile to use
set_property(CACHE OPENGL_PROFILE PROPERTY STRINGS OpenGL OpenGLES2 OpenGLES3)
if (ENABLE_SCCACHE)
find_program(SCCACHE "sccache")
find_program(SCCACHE "sccache" HINTS "$ENV{HOME}/.cargo/bin")
if (SCCACHE)
message(STATUS "Using sccache (instead of ccache) to speed up compilation")
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE})
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE})
else()
message(WARNING "ENABLE_SCCACHE is on, but sccache was not found.")
endif()
endif ()