Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | foreach(LANGUAGE C CXX) | ||||
set(COMPILER_DEBUG_LEVEL -g) | set(COMPILER_DEBUG_LEVEL -g) | ||||
check_compiler_flags(G3_IS_SUPPORTED ${LANGUAGE} -g3) | check_compiler_flags(G3_IS_SUPPORTED ${LANGUAGE} -g3) | ||||
if(${G3_IS_SUPPORTED}) | if(${G3_IS_SUPPORTED}) | ||||
set(COMPILER_DEBUG_LEVEL -g3) | set(COMPILER_DEBUG_LEVEL -g3) | ||||
endif() | endif() | ||||
add_compile_options_to_configuration_for_language(Debug ${LANGUAGE} ${COMPILER_DEBUG_LEVEL}) | add_compile_options_to_configuration_for_language(Debug ${LANGUAGE} ${COMPILER_DEBUG_LEVEL}) | ||||
endforeach() | endforeach() | ||||
# Define the debugging symbols DEBUG and DEBUG_LOCKORDER when the Debug build | # Define some debugging symbols when the Debug build type is selected. | ||||
# type is selected. | add_compile_definitions_to_configuration(Debug DEBUG DEBUG_LOCKORDER ABORT_ON_FAILED_ASSUME) | ||||
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(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||||
▲ Show 20 Lines • Show All 614 Lines • Show Last 20 Lines |