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
|
# Package overloads - Linux
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
set(JEMALLOC_LIBRARY "jemalloc")
|
if (NOT NOJEM)
|
||||||
|
set(JEMALLOC_LIBRARY "jemalloc")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set default configuration directory
|
# set default configuration directory
|
||||||
|
|||||||
@@ -78,4 +78,10 @@ if( WIN32 )
|
|||||||
endif()
|
endif()
|
||||||
endif( WIN32 )
|
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("")
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ elseif( MSVC )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
if(SERVERS)
|
if(SERVERS AND NOT NOJEM)
|
||||||
add_subdirectory(jemalloc)
|
add_subdirectory(jemalloc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -201,4 +201,3 @@ if( USE_COREPCH )
|
|||||||
add_native_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH)
|
add_native_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user