mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Compile with Compiler Cache (ccache) if it's installed
Install with `sudo apt install ccache`. Makes building a huge lot faster, especially when switching branches. Nothing happens if ccache is not installed. Example: (measured on my laptop) ``` $ ccache -C # clear the cache $ rm -fr build $ cd build $ cmake -DWITH_XC_ALL=ON -DCMAKE_BUILD_TYPE=Release .. $ time make -j4 ... real 5m8,817s user 16m47,107s sys 1m38,808s $ rm -fr ../build/* $ cmake -DWITH_XC_ALL=ON -DCMAKE_BUILD_TYPE=Release .. $ time make -j4 ... real 0m32,571s user 1m0,253s sys 0m24,069s ```
This commit is contained in:
parent
54eafc8ebe
commit
b13454eeb4
@ -27,6 +27,13 @@ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# Use the Compiler Cache (ccache) if it is installed
|
||||
# (install with: sudo apt get ccache)
|
||||
find_program (CCACHE_FOUND ccache)
|
||||
if (CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
endif (CCACHE_FOUND)
|
||||
|
||||
# Support Visual Studio Code
|
||||
include(CMakeToolsHelpers OPTIONAL)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user