1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #4982

Yuri (1):
      feat: Add the cmake option USE_CCACHE
This commit is contained in:
sudden6 2018-03-04 13:18:36 +01:00
commit 3780acffe8
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -11,6 +11,7 @@ option(PLATFORM_EXTENSIONS "Enable platform specific extensions, requires extra
option(USE_FILTERAUDIO "Enable the echo canceling backend" ON) option(USE_FILTERAUDIO "Enable the echo canceling backend" ON)
# AUTOUPDATE is currently broken and thus disabled # AUTOUPDATE is currently broken and thus disabled
option(AUTOUPDATE "Enable the auto updater" OFF) option(AUTOUPDATE "Enable the auto updater" OFF)
option(USE_CCACHE "Use ccache when available" ON)
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug) set(CMAKE_BUILD_TYPE Debug)
@ -69,10 +70,16 @@ endif()
# Use ccache when available to speed up builds. # Use ccache when available to speed up builds.
find_program(CCACHE_FOUND ccache) if (USE_CCACHE)
if(CCACHE_FOUND) find_program(CCACHE_FOUND ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) if(CCACHE_FOUND)
message(STATUS "using ccache") set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
message(STATUS "using ccache")
else()
message(STATUS "ccache not found")
endif()
else()
message(STATUS "ccache disabled; set option USE_CCACHE=ON to use ccache if available")
endif() endif()
# Search for headers in current directory. # Search for headers in current directory.