Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ project(solidity VERSION ${PROJECT_VERSION})

option(SOLC_LINK_STATIC "Link solc executable statically on supported platforms" OFF)

# Setup cccache.
include(EthCcache)

# Let's find our dependencies
include(EthDependencies)
include(jsoncpp)
Expand Down
15 changes: 15 additions & 0 deletions cmake/EthCcache.cmake
Original file line number Diff line number Diff line change
@@ -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()
8 changes: 0 additions & 8 deletions cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
#
# These settings then end up spanning all POSIX platforms (Linux, OS X, BSD, etc)

# Use ccache if available
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
message("Using ccache")
endif(CCACHE_FOUND)

include(CheckCXXCompilerFlag)

check_cxx_compiler_flag(-fstack-protector-strong have_stack_protector_strong)
Expand Down