Skip to content

Commit e48bad5

Browse files
authored
Added support ccache for speedup compilation on Linux
1 parent 93dfa8a commit e48bad5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ endif()
6969
set(ENABLE_UPDATE_CHECKER (NOT ${DEVELOPMENT_BUILD}) CACHE BOOL
7070
"Whether to enable update checks by default")
7171

72+
find_program(CCACHE_FOUND ccache)
73+
if (CCACHE_FOUND)
74+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
75+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
76+
set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros)
77+
endif ()
78+
7279
# Included stuff
7380
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
7481

0 commit comments

Comments
 (0)