Add support for building conveniently with ccache
Pass -DQT_USE_CCACHE=ON to enable the use of ccache. This avoids having to set up symlinks, which is useful when cross-compiling against different targets. Change-Id: I023fff105baaa538730997948aa122d2678887ce Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
This commit is contained in:
parent
c604a1265a
commit
d61b6ea30a
@ -47,3 +47,11 @@ endif()
|
||||
|
||||
## Enable support for sanitizers:
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake)
|
||||
|
||||
option(QT_USE_CCACHE "Enable the use of ccache")
|
||||
if(QT_USE_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_OBJC_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user