Files
scylladb/cmake/mode.DEV.cmake
Kefu Chai 2b961d8e3f build: cmake: define per-mode compile definition
instead of setting for a single CMAKE_BUILD_TYPE, set the compilation
definitions for each build configuration.

this prepares for the multi-config generator.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#15943
2023-11-06 10:34:38 +02:00

21 lines
465 B
CMake

set(Seastar_OptimizationLevel_DEV "2")
set(CMAKE_CXX_FLAGS_DEV
""
CACHE
INTERNAL
"")
string(APPEND CMAKE_CXX_FLAGS_DEV
" -O${Seastar_OptimizationLevel_DEV}")
set(Seastar_DEFINITIONS_DEV
SCYLLA_BUILD_MODE=devel
DEVEL
SEASTAR_ENABLE_ALLOC_FAILURE_INJECTION
SCYLLA_ENABLE_ERROR_INJECTION)
foreach(definition ${Seastar_DEFINITIONS_DEV})
add_compile_definitions(
$<$<CONFIG:Dev>:${definition}>)
endforeach()
set(stack_usage_threshold_in_KB 21)