Enabled JEMALLOC_DEBUG in debug build [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-08-29 18:54:00 +03:00
parent 3361247126
commit cf33608e62
2 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,7 @@ if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "None")
set (CMAKE_BUILD_TYPE "RELWITHDEBINFO")
endif ()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
message (STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE} )
message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
set (CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Debug;Release;MinSizeRel" CACHE STRING "" FORCE)

View File

@ -50,3 +50,7 @@ target_include_directories(jemalloc PRIVATE
${JEMALLOC_SOURCE_DIR}/include)
target_compile_definitions(jemalloc PRIVATE -DJEMALLOC_NO_PRIVATE_NAMESPACE)
if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
target_compile_definitions(jemalloc PRIVATE -DJEMALLOC_DEBUG=1)
endif ()