Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
# Define the debugging symbols DEBUG and DEBUG_LOCKORDER when the Debug build | # Define the debugging symbols DEBUG and DEBUG_LOCKORDER when the Debug build | ||||
# type is selected. | # type is selected. | ||||
add_compile_definitions_to_configuration(Debug DEBUG DEBUG_LOCKORDER) | add_compile_definitions_to_configuration(Debug DEBUG DEBUG_LOCKORDER) | ||||
# Add -ftrapv when building in Debug | # Add -ftrapv when building in Debug | ||||
add_compile_options_to_configuration(Debug -ftrapv) | add_compile_options_to_configuration(Debug -ftrapv) | ||||
# All versions of gcc that we commonly use for building are subject to bug | |||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set | |||||
# -fstack-reuse=none for all gcc builds. (Only gcc understands this flag) | |||||
add_compiler_flags(-fstack-reuse=none) | |||||
# 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") | ||||
# Ensure that WINDRES_PREPROC is enabled when using windres. | # Ensure that WINDRES_PREPROC is enabled when using windres. | ||||
list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | ||||
# Build all static so there is no dll file to distribute. | # Build all static so there is no dll file to distribute. | ||||
add_linker_flags(-static) | add_linker_flags(-static) | ||||
endif() | endif() | ||||
▲ Show 20 Lines • Show All 481 Lines • Show Last 20 Lines |