Skip to content

Commit 98cf8d2

Browse files
committed
[CMake] Add cache for enabling sccache builds
Add cmake cache for enabling sccache while building with the new runtime build when sccache is available. To build with sccache, pass the `sccache.cmake` ``` cmake \ -B build \ -S Runtime/Core \ -C Runtimes/Core/cmake/cache/sccache.cmake ```
1 parent c7ddbee commit 98cf8d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
find_program(SCCACHE_EXECUTABLE sccache)
2+
3+
if(SCCACHE_EXECUTABLE)
4+
set(CMAKE_C_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" CACHE FILEPATH "")
5+
set(CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" CACHE FILEPATH "")
6+
message(STATUS "sccache enabled")
7+
endif()

0 commit comments

Comments
 (0)