Add Ccache.
Summary: Adding ccache option improves each additional build time by a big factor. Example of performance, modification to a header file: src/io/network/socket.hpp without ccache: real 0m26.950s user 1m18.636s sys 0m6.160s with ccache: real 0m10.644s user 0m30.616s sys 0m4.548s Reviewers: buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D63
This commit is contained in:
parent
8220808f56
commit
c8ef12910d
@ -9,6 +9,13 @@ if(NOT UNIX)
|
||||
message(FATAL "Unsupported operating system.")
|
||||
endif()
|
||||
|
||||
#look for ccache and set it up
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
endif(CCACHE_FOUND)
|
||||
|
||||
# choose a compiler
|
||||
# NOTE: must be choosen before use of project() or enable_language() ----------
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
|
Loading…
Reference in New Issue
Block a user