Core/Misc: Add valgrind support for jemalloc

Set CMake option VALGRIND to add valgrind support to jemalloc. Set CMake parameter VALGRIND_INCLUDE_DIR to the valgrind include directory.
This commit is contained in:
jackpoz
2015-06-20 22:54:53 +02:00
parent d5c84d5aaa
commit 60a29f7614
2 changed files with 8 additions and 0 deletions

View File

@@ -106,6 +106,13 @@ if ( NOJEM )
message(" *** jemalloc linking has been disabled!")
message(" *** Please note that this is for DEBUGGING WITH VALGRIND only!")
message(" *** DO NOT DISABLE IT UNLESS YOU KNOW WHAT YOU'RE DOING!")
elseif ( VALGRIND )
message("")
message(" *** VALGRIND - WARNING!")
message(" *** jemalloc will be configured to support Valgrind")
message(" *** Please specify the valgrind include directory in VALGRIND_INCLUDE_DIR option if you get build errors")
message(" *** Please note that this is for DEBUGGING WITH VALGRIND only!")
add_definitions(-DJEMALLOC_VALGRIND)
endif()
if ( HELGRIND )

View File

@@ -53,6 +53,7 @@ set(jemalloc_STAT_SRC
include_directories(
${BUILDDIR}/
${CMAKE_CURRENT_SOURCE_DIR}/include
${VALGRIND_INCLUDE_DIR}
)
add_definitions(-D_GNU_SOURCE -D_REENTRANT)