cmake: remove add_definitions(-DNO_TCMALLOC), instead use ENABLE_LIBTCMALLOC from config (#375)

* Manual version update to [54135]

* Temporary release script fix [#METRIQA-732]

* cmake: remove add_definitions(-DNO_TCMALLOC), instead use ENABLE_LIBTCMALLOC from config
This commit is contained in:
proller 2017-01-20 20:58:07 +03:00 committed by alexey-milovidov
parent 8710a82437
commit 2688f4563f
5 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
add_definitions(
-DNO_TCMALLOC_SAMPLES -DNO_TCMALLOC_SAMPLES
-DNO_TCMALLOC_SAMPLES
-DNDEBUG -DNO_FRAME_POINTER
-Wwrite-strings -Wno-sign-compare -Wno-unused-result
-Wno-deprecated-declarations -Wno-unused-function

View File

@ -11,10 +11,6 @@ include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libre2/)
include_directories (BEFORE ${ClickHouse_BINARY_DIR}/contrib/libre2/)
include_directories (${ClickHouse_SOURCE_DIR}/libs/libdaemon/include/)
if (NOT ENABLE_LIBTCMALLOC)
add_definitions(-DNO_TCMALLOC)
endif ()
if (NOT NO_WERROR)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")

View File

@ -9,7 +9,9 @@
#include <DB/Databases/IDatabase.h>
#include <chrono>
#ifndef NO_TCMALLOC
#include <common/config_common.h>
#if ENABLE_LIBTCMALLOC
#include <gperftools/malloc_extension.h>
/// Initializing malloc extension in global constructor as required.
@ -197,7 +199,7 @@ void AsynchronousMetrics::update()
set("MaxPartCountForPartition", max_part_count_for_partition);
}
#ifndef NO_TCMALLOC
#if ENABLE_LIBTCMALLOC
{
/// tcmalloc related metrics. Remove if you switch to different allocator.

View File

@ -1,4 +1,5 @@
#ifndef NO_TCMALLOC
#include <common/config_common.h>
#if ENABLE_LIBTCMALLOC
#include <gperftools/malloc_extension.h>
#endif
#include "Server.h"
@ -36,7 +37,7 @@ static bool isClickhouseApp(const std::string & app_suffix, std::vector<char *>
int main(int argc_, char ** argv_)
{
#ifndef NO_TCMALLOC
#if ENABLE_LIBTCMALLOC
MallocExtension::instance()->SetNumericProperty("tcmalloc.aggressive_memory_decommit", false);
#endif

View File

@ -3,3 +3,4 @@
// .h autogenerated by cmake !
#cmakedefine01 APPLE_SIERRA_OR_NEWER
#cmakedefine01 ENABLE_LIBTCMALLOC