1
0
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:
Zetok Zalbavar 2017-01-08 13:36:31 +00:00
parent c4fb84e83e
commit a143cf3e9e
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -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-exceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") 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. # Search for headers in current directory.
include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}) include_directories(${CMAKE_SOURCE_DIR})