Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show All 18 Lines | |||||
# 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) | ||||
# Ensure that WINDRES_PREPROC is enabled when using windres. | |||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||||
# Ensure that WINDRES_PREPROC is enabled when using windres. | |||||
list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | ||||
# CMake adds a library path to the compiler insallation directory. | |||||
# This may conflict with the depends/<mingw>/lib directory, so remove it. | |||||
deadalnix: Remove what ? | |||||
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "") | |||||
endif() | endif() | ||||
# CMake provides the POSITION_INDEPENDENT_CODE property to set PIC/PIE. | # CMake provides the POSITION_INDEPENDENT_CODE property to set PIC/PIE. | ||||
# Unfortunately setting the -pie linker flag this way required CMake >= 3.14, | # Unfortunately setting the -pie linker flag this way required CMake >= 3.14, | ||||
# which is not widely distributed at the time of writing. | # which is not widely distributed at the time of writing. | ||||
# FIXME: use the POSITION_INDEPENDENT_CODE property instead | # FIXME: use the POSITION_INDEPENDENT_CODE property instead | ||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||||
add_compiler_flag(-fPIC -fPIE) | add_compiler_flag(-fPIC -fPIE) | ||||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |
Remove what ?