Buildsystem/CMake: Add the ability to avoid linking the core with jemalloc on linux through using the -DNOJEM parameter.

WARNING: This is a developer flag only, and as such NOT documented elsewhere - we need this for valgrind and related tools.
Again : YOU HAVE BEEN WARNED! DO NOT USE THIS FLAG UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
This commit is contained in:
click
2012-03-25 17:14:08 +02:00
parent 4e6fce1112
commit e2a92d4bbc
4 changed files with 12 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
# Package overloads - Linux
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(JEMALLOC_LIBRARY "jemalloc")
if (NOT NOJEM)
set(JEMALLOC_LIBRARY "jemalloc")
endif()
endif()
# set default configuration directory

View File

@@ -78,4 +78,10 @@ if( WIN32 )
endif()
endif( WIN32 )
message("")
if ( NOJEM )
message("")
message("*** WARNING: 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!")
endif()
message("")

View File

@@ -15,8 +15,8 @@ elseif( MSVC )
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
if(SERVERS)
add_subdirectory(jemalloc)
if(SERVERS AND NOT NOJEM)
add_subdirectory(jemalloc)
endif()
endif()

View File

@@ -201,4 +201,3 @@ if( USE_COREPCH )
add_native_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH)
endif()
endif()