build: cmake: drop build_mode

there is no benefit having this variable. and it introduces
another layer of indirection. so drop it.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2023-11-03 14:29:13 +08:00
parent 7369e2e3df
commit 23bb644314
7 changed files with 2 additions and 3 deletions

View File

@@ -23,8 +23,7 @@ if(DEFINED CMAKE_BUILD_TYPE)
"Following types are supported: ${scylla_build_types}")
endif()
endif(DEFINED CMAKE_BUILD_TYPE)
string(TOUPPER "${CMAKE_BUILD_TYPE}" build_mode)
include(mode.${build_mode})
include(mode.${CMAKE_BUILD_TYPE})
include(mode.common)
add_compile_definitions(
FMT_DEPRECATED_OSTREAM)

View File

@@ -13,7 +13,7 @@ set(cql_parser_srcs ${cql_grammar_srcs})
list(FILTER cql_parser_srcs INCLUDE REGEX "Parser.cpp$")
set(unoptimized_levels "0" "g" "s")
if(Seastar_OptimizationLevel_${build_mode} IN_LIST unoptimized_levels)
if(Seastar_OptimizationLevel_${CMAKE_BUILD_TYPE} IN_LIST unoptimized_levels)
# Unoptimized parsers end up using huge amounts of stack space and
# overflowing their stack
list(APPEND cql_parser_compile_options