Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show All 13 Lines | |||||
option(BUILD_BITCOIN_SEEDER "Build bitcoin-seeder" ON) | option(BUILD_BITCOIN_SEEDER "Build bitcoin-seeder" ON) | ||||
option(BUILD_BITCOIN_CLI "Build bitcoin-cli" ON) | option(BUILD_BITCOIN_CLI "Build bitcoin-cli" ON) | ||||
option(BUILD_BITCOIN_TX "Build bitcoin-tx" ON) | option(BUILD_BITCOIN_TX "Build bitcoin-tx" ON) | ||||
option(BUILD_BITCOIN_QT "Build bitcoin-qt" ON) | option(BUILD_BITCOIN_QT "Build bitcoin-qt" ON) | ||||
option(ENABLE_HARDENING "Harden the executables" ON) | option(ENABLE_HARDENING "Harden the executables" ON) | ||||
option(ENABLE_REDUCE_EXPORTS "Reduce the amount of exported symbols" OFF) | option(ENABLE_REDUCE_EXPORTS "Reduce the amount of exported symbols" OFF) | ||||
option(ENABLE_STATIC_LIBSTDCXX "Statically link libstdc++" OFF) | option(ENABLE_STATIC_LIBSTDCXX "Statically link libstdc++" OFF) | ||||
# Allow usage of sanitizers by setting ECM_ENABLE_SANITIZERS | |||||
if(ENABLE_SANITIZERS) | |||||
set(ECM_ENABLE_SANITIZERS ${ENABLE_SANITIZERS}) | |||||
find_package(ECM NO_MODULE) | |||||
if(ECM_MODULE_PATH) | |||||
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) | |||||
include(ECMEnableSanitizers) | |||||
else() | |||||
message(FATAL_ERROR | |||||
"ECM is required to enable the sanitizers (https://api.kde.org/ecm/index.html)" | |||||
) | |||||
endif() | |||||
endif() | |||||
# Cmake uses the CMAKE_BUILD_TYPE variable to select the build configuration. | # Cmake uses the CMAKE_BUILD_TYPE variable to select the build configuration. | ||||
# By default it supports more configurations that needed for Bitcoin ABC, and | # By default it supports more configurations that needed for Bitcoin ABC, and | ||||
# all the releases types set NDEBUG which is unwanted as it disables the assert | # all the releases types set NDEBUG which is unwanted as it disables the assert | ||||
# completely. | # completely. | ||||
# Remove the -DNDEBUG flag from the CFLAGS/CXXFLAGS in all the configurations | # Remove the -DNDEBUG flag from the CFLAGS/CXXFLAGS in all the configurations | ||||
include(AddCompilerFlags) | include(AddCompilerFlags) | ||||
remove_compiler_flags(-DNDEBUG) | remove_compiler_flags(-DNDEBUG) | ||||
▲ Show 20 Lines • Show All 354 Lines • Show Last 20 Lines |