in this change,
* all `Seastar_OptimizationLevel_*` are dropped.
* mode.Sanitize.cmake:
s/CMAKE_CXX_FLAGS_COVERAGE/CMAKE_CXX_FLAGS_SANITIZE/
* mode.Dev.cmake:
s/CMAKE_CXX_FLAGS_RELEASE/CMAKE_CXX_FLAGS_DEV/
Seastar_OptimizationLevel_* variables have nothing to do with
Seastar, and they introduce unnecessary indirection. the function
of `update_cxx_flags()` already requires an option name for this
parameter, so there is no need to have a name for it.
the cached entry of `Seastar_OptimizationLevel_DEBUG` is also
dropped, if we really need to have knobs which can be configured
by user, we should define them in a more formal way. at this
moment, this is not necessary. so drop it along with this
variable.
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
Closes scylladb/scylladb#16059
20 lines
414 B
CMake
20 lines
414 B
CMake
set(CMAKE_CXX_FLAGS_DEV
|
|
""
|
|
CACHE
|
|
INTERNAL
|
|
"")
|
|
update_cxx_flags(CMAKE_CXX_FLAGS_DEV
|
|
OPTIMIZATION_LEVEL "2")
|
|
|
|
set(Seastar_DEFINITIONS_DEV
|
|
SCYLLA_BUILD_MODE=dev
|
|
DEVEL
|
|
SEASTAR_ENABLE_ALLOC_FAILURE_INJECTION
|
|
SCYLLA_ENABLE_ERROR_INJECTION)
|
|
foreach(definition ${Seastar_DEFINITIONS_DEV})
|
|
add_compile_definitions(
|
|
$<$<CONFIG:Dev>:${definition}>)
|
|
endforeach()
|
|
|
|
maybe_limit_stack_usage_in_KB(21 Dev)
|