Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show All 14 Lines | |||||
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) | ||||
# 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 | ||||
deadalnix: Not if you change the configuration after the fact... | |||||
include(AddCompilerFlags) | include(AddCompilerFlags) | ||||
remove_compiler_flags(-DNDEBUG) | remove_compiler_flags(-DNDEBUG) | ||||
# Default to RelWithDebInfo configuration | |||||
if(NOT CMAKE_BUILD_TYPE) | |||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING | |||||
"Select the configuration for the build" FORCE) | |||||
endif() | |||||
deadalnixUnsubmitted Not Done Inline ActionsThis comes after flags have been modified the line just before. This is probably a bad idea. deadalnix: This comes after flags have been modified the line just before. This is probably a bad idea. | |||||
# Ensure that WINDRES_PREPROC is enabled when using windres. | # Ensure that WINDRES_PREPROC is enabled when using windres. | ||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||||
list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | ||||
endif() | endif() | ||||
# Enable warning | # Enable warning | ||||
# CMake provides the POSITION_INDEPENDENT_CODE property to set PIC/PIE. | # CMake provides the POSITION_INDEPENDENT_CODE property to set PIC/PIE. | ||||
▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines |
Not if you change the configuration after the fact...