Skip to content

Commit ada2b2a

Browse files
committed
fix
1 parent fa445df commit ada2b2a

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ option(SUPPORT_TTL "whether support TTL" OFF)
2525
option(OPT_SUPPORT_ZSTD_TRACE "whether support zstd trace" ON)
2626
option(ENABLE_LRB "enable LRB" OFF)
2727
option(ENABLE_3L_CACHE "enable 3LCache" OFF)
28-
set(LOG_LEVEL NONE CACHE STRING "change the logging level")
29-
set_property(CACHE LOG_LEVEL PROPERTY STRINGS ERROR WARN INFO DEBUG VERBOSE)
28+
set(LOG_LEVEL "default" CACHE STRING "change the logging level")
29+
set_property(CACHE LOG_LEVEL PROPERTY STRINGS ERROR WARN INFO DEBUG VERBOSE DEFAULT)
3030

3131
# Platform detection
3232
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@@ -51,9 +51,15 @@ if(USE_HUGEPAGE)
5151
add_compile_definitions(USE_HUGEPAGE=1)
5252
endif()
5353

54+
if(NOT CMAKE_BUILD_TYPE)
55+
# we can also consider RelWithDebInfo, but it will be too slow for release build
56+
set(CMAKE_BUILD_TYPE Release)
57+
endif()
58+
59+
5460
string(TOLOWER "${LOG_LEVEL}" LOG_LEVEL_LOWER)
5561

56-
if(LOG_LEVEL_LOWER STREQUAL "none")
62+
if(LOG_LEVEL_LOWER STREQUAL "default")
5763
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
5864
message(STATUS "LOG_LEVEL is not set, use DEBUG as default for debug build")
5965
add_compile_definitions(LOGLEVEL=6)
@@ -77,11 +83,6 @@ else()
7783
endif()
7884

7985

80-
if(NOT CMAKE_BUILD_TYPE)
81-
# we can also consider RelWithDebInfo, but it will be too slow for release build
82-
set(CMAKE_BUILD_TYPE Release)
83-
endif()
84-
8586

8687
# Define shared compiler flags for all targets
8788
set(LIBCACHESIM_C_FLAGS

0 commit comments

Comments
 (0)