Files
scylladb/cmake/mode.Debug.cmake
Kefu Chai 0c1864eebd build: cmake: define per-config build mode
so that scylla_build_mode_$<CONFIG> can be referenced when necessary.
we using it for referencing build mode in the building system instead
of the CMake configuration name.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-03-06 15:53:11 +08:00

25 lines
642 B
CMake

if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
# -fasan -Og breaks some coroutines on aarch64, use -O0 instead
set(OptimizationLevel "0")
else()
set(OptimizationLevel "g")
endif()
update_cxx_flags(CMAKE_CXX_FLAGS_DEBUG
WITH_DEBUG_INFO
OPTIMIZATION_LEVEL ${OptimizationLevel})
set(scylla_build_mode_Debug "debug")
set(Seastar_DEFINITIONS_DEBUG
SCYLLA_BUILD_MODE=${scylla_build_mode_Debug}
DEBUG
SANITIZE
DEBUG_LSA_SANITIZER
SCYLLA_ENABLE_ERROR_INJECTION)
foreach(definition ${Seastar_DEFINITIONS_DEBUG})
add_compile_definitions(
$<$<CONFIG:Debug>:${definition}>)
endforeach()
maybe_limit_stack_usage_in_KB(40 Debug)