Setup sccache

This commit is contained in:
momo5502
2025-05-29 09:44:04 +02:00
parent c559c2ff43
commit 5041bab9f8
4 changed files with 40 additions and 1 deletions

15
cmake/sccache.cmake Normal file
View File

@@ -0,0 +1,15 @@
include_guard()
if(CMAKE_GENERATOR STREQUAL "Ninja")
find_program(SCCACHE sccache REQUIRED)
if (SCCACHE)
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE})
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE})
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
if(POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
endif()
endif()
endif()