Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
312 changes: 0 additions & 312 deletions ARCHITECTURE_DIAGRAM.md

This file was deleted.

23 changes: 22 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ set(NETWORK_SOURCES
src/network/BinaryProtocol.cpp
src/network/ConnectionManager.cpp
src/network/GameServer.cpp
src/network/GameSession.cpp
src/network/BinarySession.cpp
src/network/NetworkQualityMonitor.cpp
src/network/PredictionSystem.cpp
src/network/WebSocketProtocol.cpp
Expand Down Expand Up @@ -139,6 +139,8 @@ set(LOGIC_CORE_SOURCES

# Database system
set(DATABASE_SOURCES
src/database/SQLProvider.cpp
src/database/DbService.cpp
src/database/DbManager.cpp
src/database/PostgreSqlClient.cpp
)
Expand All @@ -163,6 +165,8 @@ include_directories(
${OPENSSL_INCLUDE_DIR}
)

option(ENABLE_ASAN "Enable AddressSanitizer and UndefinedBehaviorSanitizer" OFF)

# Main executable
add_executable(gameserver
src/main.cpp
Expand All @@ -177,6 +181,23 @@ add_executable(gameserver
${DATABASE_SOURCES}
)

if(ENABLE_ASAN)
message(STATUS "Enabling AddressSanitizer and UndefinedBehaviorSanitizer")
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(gameserver PRIVATE
-fsanitize=address,undefined
-fno-omit-frame-pointer
-g
-O1
)
target_link_options(gameserver PRIVATE
-fsanitize=address,undefined
)
elseif(MSVC)
target_compile_options(gameserver PRIVATE /fsanitize=address)
endif()
endif()

# Add target-specific preprocessor definitions
if(USE_CITUS)
target_compile_definitions(gameserver PRIVATE USE_CITUS=1)
Expand Down
Loading
Loading