Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
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 | # 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 | # 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) | # -fstack-reuse=none for all gcc builds. (Only gcc understands this flag) | ||||
if(NOT ENABLE_CLANG_TIDY) | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||||
add_compiler_flags(-fstack-reuse=none) | add_compiler_flags(-fstack-reuse=none) | ||||
endif() | endif() | ||||
# 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") | ||||
▲ Show 20 Lines • Show All 554 Lines • Show Last 20 Lines |