mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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("")
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -201,4 +201,3 @@ if( USE_COREPCH )
|
||||
add_native_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user