aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-11-28 20:21:21 +0100
committerShauren <shauren.trinity@gmail.com>2016-11-28 20:21:21 +0100
commit9633c8c2b70d230ec0c0825e29f52722744afcb4 (patch)
tree40454e371a71ca0ff28f43c039f88a31f3fa3951 /src/common
parente0fb4445cd2f5f4bb94ea23122548debddc41ba6 (diff)
Core/Debugging: Partially revert e0fb4445cd2f5f4bb94ea23122548debddc41ba6, the cmake hack to build wheaty directly into executable is still needed as it is impossible to have it initialize before every other static variable when it resides in dll (dynamic linking only)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt8
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp5
-rw-r--r--src/common/Debugging/WheatyExceptionReport.h3
3 files changed, 8 insertions, 8 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 231951ed283..0428738f2dd 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -12,9 +12,17 @@ CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES
# Exclude
+ ${CMAKE_CURRENT_SOURCE_DIR}/Debugging
${CMAKE_CURRENT_SOURCE_DIR}/Platform
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
+# Manually set sources for Debugging directory as we don't want to include WheatyExceptionReport in common project
+# It needs to be included both in authserver and worldserver for the static global variable to be properly initialized
+# and to handle crash logs on windows
+list(APPEND PRIVATE_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Errors.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Errors.h)
+
if (USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/commonPCH.h)
set(PRIVATE_PCH_SOURCE PrecompiledHeaders/commonPCH.cpp)
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp
index 29d9a35af8a..68226d9c3a6 100644
--- a/src/common/Debugging/WheatyExceptionReport.cpp
+++ b/src/common/Debugging/WheatyExceptionReport.cpp
@@ -1463,8 +1463,3 @@ char* WheatyExceptionReport::PrintSymbolDetail(char* pszCurrBuffer)
}
#endif // _WIN32
-
-void InitializeCrashHandler()
-{
- // dummy call to make the linker not discard the compilation unit
-}
diff --git a/src/common/Debugging/WheatyExceptionReport.h b/src/common/Debugging/WheatyExceptionReport.h
index de6b6f375e3..34919b19e01 100644
--- a/src/common/Debugging/WheatyExceptionReport.h
+++ b/src/common/Debugging/WheatyExceptionReport.h
@@ -210,8 +210,5 @@ class WheatyExceptionReport
extern WheatyExceptionReport g_WheatyExceptionReport; // global instance of class
#endif // _WIN32
-
-// dummy call to make the linker not discard the compilation unit
-void InitializeCrashHandler();
#endif // _WHEATYEXCEPTIONREPORT_