Skip to content

Commit 5b294fe

Browse files
author
Github Actions
committed
Merge 3.3.5-base_patch to 3.3.5-passive_anticheat
2 parents 84aa463 + f9f1262 commit 5b294fe

File tree

411 files changed

+12441
-7797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+12441
-7797
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
codestyle_and_sql:
44
docker:
5-
- image: trinitycore/circle-ci:3.3.5-base-22.04
5+
- image: trinitycore/circle-ci:debian-12-builder
66
auth:
77
username: $DOCKERHUB_USERNAME
88
password: $DOCKERHUB_PASSWORD
@@ -38,7 +38,7 @@ jobs:
3838
cat sql/updates/world/3.3.5/*.sql | mysql -h 127.0.0.1 -uroot world
3939
pch:
4040
docker:
41-
- image: trinitycore/circle-ci:3.3.5-base-22.04
41+
- image: trinitycore/circle-ci:debian-12-builder
4242
auth:
4343
username: $DOCKERHUB_USERNAME
4444
password: $DOCKERHUB_PASSWORD
@@ -97,7 +97,7 @@ jobs:
9797
path: docker.tar.gz
9898
nopch:
9999
docker:
100-
- image: trinitycore/circle-ci:3.3.5-base-22.04
100+
- image: trinitycore/circle-ci:debian-12-builder
101101
auth:
102102
username: $DOCKERHUB_USERNAME
103103
password: $DOCKERHUB_PASSWORD

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ project(TrinityCore)
2121
cmake_policy(SET CMP0005 NEW)
2222
cmake_policy(SET CMP0043 NEW) # Ignore COMPILE_DEFINITIONS_<Config> properties
2323
cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted - prevents intepreting if(SOME_STRING_VARIABLE MATCHES "MSVC") as if(SOME_STRING_VARIABLE MATCHES "1")
24+
cmake_policy(SET CMP0067 NEW) # Honor language standard in try_compile() source-file signature
2425
cmake_policy(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT variables
2526

2627
if(POLICY CMP0144)
2728
cmake_policy(SET CMP0144 NEW) # find_package() uses upper-case <PACKAGENAME>_ROOT variables
2829
endif()
2930

31+
if(POLICY CMP0153)
32+
cmake_policy(SET CMP0153 NEW) # The exec_program() command should not be called
33+
endif()
34+
3035
# Set RPATH-handing (CMake parameters)
3136
set(CMAKE_SKIP_BUILD_RPATH 0)
3237
set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)

cmake/compiler/clang/settings.cmake

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# Set build-directive (used in core to tell which buildtype we used)
2-
target_compile_definitions(trinity-compile-option-interface
3-
INTERFACE
4-
-D_BUILD_DIRECTIVE="$<CONFIG>")
5-
61
set(CLANG_EXPECTED_VERSION 11.0.0)
72
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
83
# apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang
@@ -38,7 +33,7 @@ if (NOT CLANG_HAVE_PROPER_CHARCONV)
3833
message(STATUS "Clang: Detected from_chars bug for 64-bit integers, workaround enabled")
3934
target_compile_definitions(trinity-compile-option-interface
4035
INTERFACE
41-
-DTRINITY_NEED_CHARCONV_WORKAROUND)
36+
TRINITY_NEED_CHARCONV_WORKAROUND)
4237
endif()
4338

4439
if(WITH_WARNINGS)

cmake/compiler/gcc/settings.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# Set build-directive (used in core to tell which buildtype we used)
2-
target_compile_definitions(trinity-compile-option-interface
3-
INTERFACE
4-
-D_BUILD_DIRECTIVE="$<CONFIG>")
5-
61
set(GCC_EXPECTED_VERSION 11.1.0)
72

83
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
@@ -11,6 +6,10 @@ else()
116
message(STATUS "GCC: Minimum version required is ${GCC_EXPECTED_VERSION}, found ${CMAKE_CXX_COMPILER_VERSION} - ok!")
127
endif()
138

9+
target_compile_options(trinity-compile-option-interface
10+
INTERFACE
11+
-fno-delete-null-pointer-checks)
12+
1413
if(PLATFORM EQUAL 32)
1514
# Required on 32-bit systems to enable SSE2 (standard on x64)
1615
target_compile_options(trinity-compile-option-interface
@@ -21,8 +20,8 @@ endif()
2120
if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64")
2221
target_compile_definitions(trinity-compile-option-interface
2322
INTERFACE
24-
-DHAVE_SSE2
25-
-D__SSE2__)
23+
HAVE_SSE2
24+
__SSE2__)
2625
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
2726
endif()
2827

@@ -36,7 +35,8 @@ if(WITH_WARNINGS)
3635
-Winvalid-pch
3736
-Wfatal-errors
3837
-Woverloaded-virtual
39-
-Wno-missing-field-initializers) # this warning is useless when combined with structure members that have default initializers
38+
-Wno-missing-field-initializers # this warning is useless when combined with structure members that have default initializers
39+
-Wno-maybe-uninitialized) # this warning causes many false positives with std::optional
4040

4141
message(STATUS "GCC: All warnings enabled")
4242
endif()

cmake/compiler/icc/settings.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
target_compile_definitions(trinity-compile-option-interface
2-
INTERFACE
3-
-D_BUILD_DIRECTIVE="$<CONFIG>")
4-
51
if(PLATFORM EQUAL 32)
62
target_compile_options(trinity-compile-option-interface
73
INTERFACE

cmake/compiler/mingw/settings.cmake

Lines changed: 0 additions & 42 deletions
This file was deleted.

cmake/compiler/msvc/settings.cmake

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
2-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
3-
41
set(MSVC_EXPECTED_VERSION 19.32)
52
set(MSVC_EXPECTED_VERSION_STRING "Microsoft Visual Studio 2022 17.2")
63

@@ -31,17 +28,13 @@ target_compile_options(trinity-compile-option-interface
3128
INTERFACE
3229
/permissive-)
3330

34-
# set up output paths ofr static libraries etc (commented out - shown here as an example only)
35-
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
36-
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
37-
3831
if(PLATFORM EQUAL 64)
3932
# This definition is necessary to work around a bug with Intellisense described
4033
# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper
4134
# debugger functionality.
4235
target_compile_definitions(trinity-compile-option-interface
4336
INTERFACE
44-
-D_WIN64)
37+
_WIN64)
4538

4639
message(STATUS "MSVC: 64-bit platform, enforced -D_WIN64 parameter")
4740

@@ -59,24 +52,19 @@ else()
5952
message(STATUS "MSVC: Disabled Safe Exception Handlers for debug builds")
6053
endif()
6154

62-
# Set build-directive (used in core to tell which buildtype we used)
63-
# msbuild/devenv don't set CMAKE_MAKE_PROGRAM, you can choose build type from a dropdown after generating projects
6455
if("${CMAKE_MAKE_PROGRAM}" MATCHES "MSBuild")
65-
target_compile_definitions(trinity-compile-option-interface
56+
# multithreaded compiling on VS
57+
target_compile_options(trinity-compile-option-interface
6658
INTERFACE
67-
-D_BUILD_DIRECTIVE="$(ConfigurationName)")
59+
/MP)
6860
else()
69-
# while all make-like generators do (nmake, ninja)
70-
target_compile_definitions(trinity-compile-option-interface
61+
# Forces writes to the PDB file to be serialized through mspdbsrv.exe (/FS)
62+
# Enable faster PDB generation in parallel builds by minimizing RPC calls to mspdbsrv.exe (/Zf)
63+
target_compile_options(trinity-compile-option-interface
7164
INTERFACE
72-
-D_BUILD_DIRECTIVE="$<CONFIG>")
65+
$<$<CONFIG:Debug,RelWithDebInfo>:/FS /Zf>)
7366
endif()
7467

75-
# multithreaded compiling on VS
76-
target_compile_options(trinity-compile-option-interface
77-
INTERFACE
78-
/MP)
79-
8068
if((PLATFORM EQUAL 64) OR (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.23026.0) OR BUILD_SHARED_LIBS)
8169
# Enable extended object support
8270
target_compile_options(trinity-compile-option-interface
@@ -86,36 +74,38 @@ if((PLATFORM EQUAL 64) OR (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.2302
8674
message(STATUS "MSVC: Enabled increased number of sections in object files")
8775
endif()
8876

89-
# /Zc:throwingNew.
90-
# When you specify Zc:throwingNew on the command line, it instructs the compiler to assume
91-
# that the program will eventually be linked with a conforming operator new implementation,
92-
# and can omit all of these extra null checks from your program.
93-
# http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx
94-
target_compile_options(trinity-compile-option-interface
95-
INTERFACE
96-
/Zc:throwingNew)
77+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
78+
# /Zc:throwingNew.
79+
# When you specify Zc:throwingNew on the command line, it instructs the compiler to assume
80+
# that the program will eventually be linked with a conforming operator new implementation,
81+
# and can omit all of these extra null checks from your program.
82+
# http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx
83+
target_compile_options(trinity-compile-option-interface
84+
INTERFACE
85+
/Zc:throwingNew)
86+
endif()
9787

9888
# Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns
9989
target_compile_definitions(trinity-compile-option-interface
10090
INTERFACE
101-
-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
91+
_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
10292
message(STATUS "MSVC: Overloaded standard names")
10393

10494
# Ignore warnings about older, less secure functions
10595
target_compile_definitions(trinity-compile-option-interface
10696
INTERFACE
107-
-D_CRT_SECURE_NO_WARNINGS)
97+
_CRT_SECURE_NO_WARNINGS)
10898
message(STATUS "MSVC: Disabled NON-SECURE warnings")
10999

110100
# Ignore warnings about POSIX deprecation
111101
target_compile_definitions(trinity-compile-option-interface
112102
INTERFACE
113-
-D_CRT_NONSTDC_NO_WARNINGS)
103+
_CRT_NONSTDC_NO_WARNINGS)
114104

115105
# Force math constants like M_PI to be available
116106
target_compile_definitions(trinity-compile-option-interface
117107
INTERFACE
118-
-D_USE_MATH_DEFINES)
108+
_USE_MATH_DEFINES)
119109

120110
message(STATUS "MSVC: Disabled POSIX warnings")
121111

@@ -167,8 +157,8 @@ target_compile_options(trinity-compile-option-interface
167157
if(ASAN)
168158
target_compile_definitions(trinity-compile-option-interface
169159
INTERFACE
170-
-D_DISABLE_STRING_ANNOTATION
171-
-D_DISABLE_VECTOR_ANNOTATION)
160+
_DISABLE_STRING_ANNOTATION
161+
_DISABLE_VECTOR_ANNOTATION)
172162

173163
target_compile_options(trinity-compile-option-interface
174164
INTERFACE

cmake/macros/CheckPlatform.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ if(WIN32)
3535
elseif(UNIX)
3636
include("${CMAKE_SOURCE_DIR}/cmake/platform/unix/settings.cmake")
3737
endif()
38+
39+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
40+
include("${CMAKE_SOURCE_DIR}/cmake/compiler/msvc/settings.cmake")
41+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
42+
include("${CMAKE_SOURCE_DIR}/cmake/compiler/clang/settings.cmake")
43+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
44+
include("${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake")
45+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
46+
include("${CMAKE_SOURCE_DIR}/cmake/compiler/icc/settings.cmake")
47+
endif()

cmake/macros/ConfigureBaseTargets.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ add_library(trinity-compile-option-interface INTERFACE)
1313

1414
# Use -std=c++11 instead of -std=gnu++11
1515
set(CMAKE_CXX_EXTENSIONS OFF)
16+
set(CMAKE_CXX_STANDARD 20)
17+
18+
# Set build-directive (used in core to tell which buildtype we used)
19+
target_compile_definitions(trinity-compile-option-interface
20+
INTERFACE
21+
_BUILD_DIRECTIVE="$<CONFIG>")
1622

1723
# An interface library to make the target features available to other targets
1824
add_library(trinity-feature-interface INTERFACE)
1925

20-
target_compile_features(trinity-feature-interface
21-
INTERFACE
22-
cxx_std_20)
23-
2426
# An interface library to make the warnings level available to other targets
2527
# This interface taget is set-up through the platform specific script
2628
add_library(trinity-warning-interface INTERFACE)

0 commit comments

Comments
 (0)