feat: enable sccache
This commit is contained in:
parent
90f78aa9ea
commit
584d22dece
3 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
# building
|
# building
|
||||||
gcc
|
gcc
|
||||||
cmake
|
cmake
|
||||||
|
sccache
|
||||||
|
|
||||||
# pre-commit
|
# pre-commit
|
||||||
pre-commit
|
pre-commit
|
||||||
|
|
|
@ -8,6 +8,7 @@ project(
|
||||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
include(ExportCompileCommands)
|
include(ExportCompileCommands)
|
||||||
|
include(sccache)
|
||||||
|
|
||||||
configure_file("${PROJECT_SOURCE_DIR}/include/version.h.in"
|
configure_file("${PROJECT_SOURCE_DIR}/include/version.h.in"
|
||||||
"${PROJECT_BINARY_DIR}/include/version.h")
|
"${PROJECT_BINARY_DIR}/include/version.h")
|
||||||
|
|
6
cmake/sccache.cmake
Normal file
6
cmake/sccache.cmake
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
find_program(SCCACHE_FOUND sccache)
|
||||||
|
|
||||||
|
if(SCCACHE_FOUND)
|
||||||
|
set(CMAKE_C_COMPILER_LAUNCHER sccache)
|
||||||
|
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
|
||||||
|
endif()
|
Loading…
Reference in a new issue