Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show All 21 Lines | |||||
option(ENABLE_GLIBC_BACK_COMPAT "Enable Glibc compatibility features" OFF) | option(ENABLE_GLIBC_BACK_COMPAT "Enable Glibc compatibility features" OFF) | ||||
option(ENABLE_QRCODE "Enable QR code display" ON) | option(ENABLE_QRCODE "Enable QR code display" ON) | ||||
option(ENABLE_UPNP "Enable UPnP support" ON) | option(ENABLE_UPNP "Enable UPnP support" ON) | ||||
option(ENABLE_NOTIFICATIONS "Enable desktop notifications" ON) | option(ENABLE_NOTIFICATIONS "Enable desktop notifications" ON) | ||||
option(ENABLE_WERROR "Promote some compiler warnings to errors" OFF) | option(ENABLE_WERROR "Promote some compiler warnings to errors" OFF) | ||||
option(START_WITH_UPNP "Make UPnP the default to map ports" OFF) | option(START_WITH_UPNP "Make UPnP the default to map ports" OFF) | ||||
option(ENABLE_CLANG_TIDY "Enable clang-tidy checks for Bitcoin ABC" OFF) | option(ENABLE_CLANG_TIDY "Enable clang-tidy checks for Bitcoin ABC" OFF) | ||||
option(ENABLE_PROFILING "Select the profiling tool to use" OFF) | option(ENABLE_PROFILING "Select the profiling tool to use" OFF) | ||||
option(USE_LD_GOLD "Try to use gold as a linker if available" ON) | |||||
# If ccache is available, then use it. | # If ccache is available, then use it. | ||||
find_program(CCACHE ccache) | find_program(CCACHE ccache) | ||||
if(CCACHE) | if(CCACHE) | ||||
message(STATUS "Using ccache: ${CCACHE}") | message(STATUS "Using ccache: ${CCACHE}") | ||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) | set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) | ||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE}) | set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE}) | ||||
endif(CCACHE) | endif(CCACHE) | ||||
Show All 16 Lines | |||||
if(ENABLE_SANITIZERS) | if(ENABLE_SANITIZERS) | ||||
include(Sanitizers) | include(Sanitizers) | ||||
enable_sanitizers(${ENABLE_SANITIZERS}) | enable_sanitizers(${ENABLE_SANITIZERS}) | ||||
endif() | endif() | ||||
include(AddCompilerFlags) | include(AddCompilerFlags) | ||||
if(USE_LD_GOLD) | |||||
add_linker_flags(-fuse-ld=gold) | |||||
endif() | |||||
# Prefer -g3, defaults to -g if unavailable | # Prefer -g3, defaults to -g if unavailable | ||||
foreach(LANGUAGE C CXX) | foreach(LANGUAGE C CXX) | ||||
set(COMPILER_DEBUG_LEVEL -g) | set(COMPILER_DEBUG_LEVEL -g) | ||||
check_compiler_flag(G3_IS_SUPPORTED ${LANGUAGE} -g3) | check_compiler_flag(G3_IS_SUPPORTED ${LANGUAGE} -g3) | ||||
if(${G3_IS_SUPPORTED}) | if(${G3_IS_SUPPORTED}) | ||||
set(COMPILER_DEBUG_LEVEL -g3) | set(COMPILER_DEBUG_LEVEL -g3) | ||||
endif() | endif() | ||||
add_compile_options_to_configuration_for_language(Debug ${LANGUAGE} ${COMPILER_DEBUG_LEVEL}) | add_compile_options_to_configuration_for_language(Debug ${LANGUAGE} ${COMPILER_DEBUG_LEVEL}) | ||||
▲ Show 20 Lines • Show All 546 Lines • Show Last 20 Lines |