Skip to content

Commit 6de3d9c

Browse files
author
Andreas Fertig
authored
Merge pull request andreasfertig#33 from andreasfertig/cmakeEnableccache
Cmake enableccache
2 parents 05e36e8 + 2061eee commit 6de3d9c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,18 @@ else()
263263
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" )
264264
endif()
265265

266+
find_program(CCACHE_FOUND ccache)
267+
if(CCACHE_FOUND)
268+
message(STATUS "Found ccache: ${CCACHE_FOUND}")
269+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
270+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
271+
272+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
273+
add_definitions(-Qunused-arguments)
274+
endif()
275+
endif(CCACHE_FOUND)
276+
277+
266278
# name the executable and all source files
267279
add_clang_executable(insights
268280
AutoStmtHandler.cpp

0 commit comments

Comments
 (0)