diff options
author | Paweł Bylica <chfast@gmail.com> | 2017-09-20 22:39:41 +0800 |
---|---|---|
committer | Paweł Bylica <chfast@gmail.com> | 2017-09-20 22:39:41 +0800 |
commit | 49c98bbc34902d2f5d66518341cfd41ac2d7bef3 (patch) | |
tree | 0c03cada4ba28bd452ee19caac0039c76a76d7f5 /cmake/EthCcache.cmake | |
parent | 137b214be471dd690aeadaf0e02b9ad0915d9e84 (diff) | |
download | dexon-solidity-49c98bbc34902d2f5d66518341cfd41ac2d7bef3.tar dexon-solidity-49c98bbc34902d2f5d66518341cfd41ac2d7bef3.tar.gz dexon-solidity-49c98bbc34902d2f5d66518341cfd41ac2d7bef3.tar.bz2 dexon-solidity-49c98bbc34902d2f5d66518341cfd41ac2d7bef3.tar.lz dexon-solidity-49c98bbc34902d2f5d66518341cfd41ac2d7bef3.tar.xz dexon-solidity-49c98bbc34902d2f5d66518341cfd41ac2d7bef3.tar.zst dexon-solidity-49c98bbc34902d2f5d66518341cfd41ac2d7bef3.zip |
CMake: Better ccache configuration
EthCcache module taken from cpp-ethereum.
Diffstat (limited to 'cmake/EthCcache.cmake')
-rw-r--r-- | cmake/EthCcache.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/EthCcache.cmake b/cmake/EthCcache.cmake new file mode 100644 index 00000000..9410cbcd --- /dev/null +++ b/cmake/EthCcache.cmake @@ -0,0 +1,15 @@ +# Setup ccache. +# +# The ccache is auto-enabled if the tool is found. +# To disable set -DCCACHE=OFF option. +if(NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER) + find_program(CCACHE ccache DOC "ccache tool path; set to OFF to disable") + if(CCACHE) + set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE}) + if(COMMAND cotire) + # Change ccache config to meet cotire requirements. + set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros) + endif() + message(STATUS "[ccache] Enabled: ${CCACHE}") + endif() +endif() |