mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Avoid Helgrind reporting libstdc++ false positive race conditions
This commit is contained in:
@@ -93,5 +93,13 @@ if ( NOJEM )
|
||||
message(" *** DO NOT DISABLE IT UNLESS YOU KNOW WHAT YOU'RE DOING!")
|
||||
endif()
|
||||
|
||||
if ( HELGRIND )
|
||||
message("")
|
||||
message(" *** HELGRIND - WARNING!")
|
||||
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 HELGRIND only!")
|
||||
add_definitions(-DHELGRIND)
|
||||
endif()
|
||||
|
||||
message("")
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Server
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_executable(authserver
|
||||
|
||||
@@ -76,6 +76,7 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Maps
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Models
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_library(collision STATIC
|
||||
|
||||
@@ -203,6 +203,7 @@ include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/server/scripts/PrecompiledHeaders
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_library(game STATIC
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#ifndef SC_SCRIPTMGR_H
|
||||
#define SC_SCRIPTMGR_H
|
||||
|
||||
#include <atomic>
|
||||
#include "Common.h"
|
||||
#include <atomic>
|
||||
#include "DBCStores.h"
|
||||
#include "QuestDef.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
@@ -143,6 +143,7 @@ include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/server/game/World
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_library(scripts STATIC
|
||||
|
||||
@@ -77,6 +77,7 @@ include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_library(shared STATIC
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
# if !defined(_GLIBCXX_USE_NANOSLEEP)
|
||||
# define _GLIBCXX_USE_NANOSLEEP
|
||||
# endif
|
||||
# if defined(HELGRIND)
|
||||
# include <valgrind/helgrind.h>
|
||||
# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) ANNOTATE_HAPPENS_BEFORE(A)
|
||||
# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) ANNOTATE_HAPPENS_AFTER(A)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -138,6 +138,7 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TCSoap
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_executable(worldserver
|
||||
|
||||
Reference in New Issue
Block a user