mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(build): make cmake use ccache when it's available
Found in https://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmake
This commit is contained in:
parent
c4fb84e83e
commit
a143cf3e9e
|
@ -43,6 +43,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
|
||||
# Use ccache when available to speed up builds.
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
message(STATUS "using ccache")
|
||||
endif()
|
||||
|
||||
# Search for headers in current directory.
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
|
|
Loading…
Reference in New Issue
Block a user