Skip to content

Commit 0c2c7bc

Browse files
committed
[TEST] Try to see if sccache is in use
1 parent eeabc29 commit 0c2c7bc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ if(NOT CMAKE_BUILD_TYPE)
5757
set(CMAKE_BUILD_TYPE Debug)
5858
endif()
5959

60+
find_program(SCCACHE sccache)
61+
if(SCCACHE)
62+
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE} CACHE STRING "C compiler launcher" FORCE)
63+
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE} CACHE STRING "C++ compiler launcher" FORCE)
64+
endif()
65+
6066
# Setup RPATH.
6167
# See https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
6268
# Use separate rpaths during build and install phases

0 commit comments

Comments
 (0)