Skip to content

Commit 6b45999

Browse files
authored
Merge branch 'master' into Crafting
2 parents 64294b8 + 3c29a0f commit 6b45999

1,673 files changed

Lines changed: 1671897 additions & 133259 deletions

File tree

Some content is hidden

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

.circleci/config.yml

Lines changed: 5 additions & 9 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:master-base-22.04
5+
- image: trinitycore/circle-ci:debian-12-builder
66
auth:
77
username: $DOCKERHUB_USERNAME
88
password: $DOCKERHUB_PASSWORD
@@ -44,7 +44,7 @@ jobs:
4444
cat sql/updates/hotfixes/master/*.sql | mysql -h 127.0.0.1 -uroot hotfixes
4545
pch:
4646
docker:
47-
- image: trinitycore/circle-ci:master-base-22.04
47+
- image: trinitycore/circle-ci:debian-12-builder
4848
auth:
4949
username: $DOCKERHUB_USERNAME
5050
password: $DOCKERHUB_PASSWORD
@@ -56,14 +56,12 @@ jobs:
5656
- run:
5757
name: Setup
5858
command: |
59-
export CFLAGS="-Werror"
60-
export CXXFLAGS="-Werror"
6159
if [ "$DOCKERHUB_PUSH_IMAGES" == "TRUE" ]; then
6260
export CMAKE_BUILD_TYPE=Release
6361
else
6462
export CMAKE_BUILD_TYPE=Debug
6563
fi
66-
cmake -S . -B ./bin -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=bin/check_install -DCMAKE_INSTALL_RPATH=\$ORIGIN/../lib -DBUILD_TESTING=1
64+
cmake -S . -B ./bin -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=bin/check_install -DCMAKE_INSTALL_RPATH=\$ORIGIN/../lib -DBUILD_TESTING=1
6765
- run:
6866
name: Build
6967
command: |
@@ -103,7 +101,7 @@ jobs:
103101
path: docker.tar.gz
104102
nopch:
105103
docker:
106-
- image: trinitycore/circle-ci:master-base-22.04
104+
- image: trinitycore/circle-ci:debian-12-builder
107105
auth:
108106
username: $DOCKERHUB_USERNAME
109107
password: $DOCKERHUB_PASSWORD
@@ -128,8 +126,6 @@ jobs:
128126
export CCACHE_MAXSIZE="1G"
129127
export CC="ccache clang"
130128
export CXX="ccache clang++"
131-
export CFLAGS="-Werror"
132-
export CXXFLAGS="-Werror"
133129
export CMAKE_BUILD_TYPE=Debug
134130
export CCACHE_CPP2=yes
135131
export USE_CCACHE=1
@@ -139,7 +135,7 @@ jobs:
139135
ccache -s
140136
git config user.email "circleci@build.bot" && git config user.name "Circle CI"
141137
$CXX --version
142-
cmake -S . -B ./bin -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=bin/check_install
138+
cmake -S . -B ./bin -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=bin/check_install
143139
- run:
144140
name: Build
145141
command: |

.github/ISSUE_TEMPLATE/sql_fix.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ body:
3636
id: fix
3737
attributes:
3838
label: SQL fix
39-
description: This field will be formatted automatically as SQL code block, no need to include \`\`\`sql
39+
description: |
40+
This field will be formatted automatically as SQL code block, no need to include \`\`\`sql
41+
42+
For large sql fixes please use https://gist.github.com/ then just paste the provided link in the following field.
4043
placeholder: |
4144
--
4245
render: sql

.github/workflows/gcc-build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ jobs:
2020
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
2121
- name: Setup
2222
env:
23-
CFLAGS: -Werror
24-
CXXFLAGS: -Werror
2523
CMAKE_BUILD_TYPE: Debug
2624
run: >
2725
cmake -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }}
28-
-DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0
26+
-DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0
2927
-DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG"
3028
-DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
3129
- name: Build

.github/workflows/macos-arm-build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ jobs:
3737
3838
- name: Configure CMake
3939
env:
40-
CFLAGS: -Werror
41-
CXXFLAGS: -Werror
4240
CMAKE_BUILD_TYPE: Debug
4341
run: >
4442
cmake -GNinja -B ${{ steps.strings.outputs.build-output-dir }}
45-
-DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DBUILD_TESTING=1
43+
-DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DBUILD_TESTING=1
4644
-DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG"
4745
-DCMAKE_INSTALL_PREFIX=check_install
4846
-S ${{ github.workspace }}

.github/workflows/win-x64-build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
& ${{ env.OPENSSL_ROOT_DIR }}/bin/openssl.exe version
5757
5858
- name: Download and install Boost
59-
uses: MarkusJx/install-boost@v2.4.5
59+
uses: MarkusJx/install-boost@v2
6060
id: install-boost
6161
with:
6262
boost_version: 1.84.0
@@ -71,12 +71,10 @@ jobs:
7171

7272
- name: Configure CMake
7373
env:
74-
CFLAGS: /WX
75-
CXXFLAGS: /WX
7674
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
7775
run: >
7876
cmake -GNinja -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }}
79-
-DTOOLS=ON
77+
-DWITH_WARNINGS_AS_ERRORS=ON -DTOOLS=ON
8078
8179
- name: Build
8280
run: |

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
99
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010

11-
if(WIN32)
12-
cmake_minimum_required(VERSION 3.24) # required for querying windows registry with cmake_host_system_information
13-
else()
14-
cmake_minimum_required(VERSION 3.22)
15-
endif()
11+
cmake_minimum_required(VERSION 3.24)
1612

1713
# add this options before PROJECT keyword
1814
set(CMAKE_DISABLE_SOURCE_CHANGES ON)

appveyor.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ environment:
77
BOOST_ROOT: C:\Libraries\boost_1_83_0
88
MYSQL_ROOT_DIR: C:\Program Files\MySQL\MySQL Server 8.0
99
OPENSSL_ROOT_DIR: C:\OpenSSL-v32-Win64
10-
CFLAGS: /WX
11-
CXXFLAGS: /WX
1210
build_script:
1311
- cmd: >-
1412
git config user.email "appveyor@build.bot" && git config user.name "AppVeyor"
1513
16-
cmake -S . -B .\build -G"Visual Studio 17 2022" -A x64 -DSCRIPTS=dynamic -DTOOLS=ON
14+
cmake -S . -B .\build -G"Visual Studio 17 2022" -A x64 -DSCRIPTS=dynamic -DWITH_WARNINGS_AS_ERRORS=ON -DTOOLS=ON
1715
1816
cd build
1917

cmake/compiler/clang/settings.cmake

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
55
# apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang
66
# version number pulled from https://en.wikipedia.org/wiki/Xcode#Toolchain_versions for row matching LLVM 11
77
set(CLANG_EXPECTED_VERSION 12.0.5)
8+
# enable -fpch-instantiate-templates for AppleClang (by default it is active only for regular clang)
9+
set(CMAKE_C_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
10+
set(CMAKE_CXX_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
811
endif()
912

1013
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)
@@ -48,7 +51,8 @@ if(WITH_WARNINGS)
4851
-Winit-self
4952
-Wfatal-errors
5053
-Wno-mismatched-tags
51-
-Woverloaded-virtual)
54+
-Woverloaded-virtual
55+
-Wno-missing-field-initializers) # this warning is useless when combined with structure members that have default initializers
5256

5357
message(STATUS "Clang: All warnings enabled")
5458
endif()
@@ -159,13 +163,3 @@ if(BUILD_SHARED_LIBS)
159163

160164
message(STATUS "Clang: Disallow undefined symbols")
161165
endif()
162-
163-
# speedup PCH builds by forcing template instantiations during PCH generation
164-
set(CMAKE_REQUIRED_FLAGS "-fpch-instantiate-templates")
165-
check_cxx_source_compiles("int main() { return 0; }" CLANG_HAS_PCH_INSTANTIATE_TEMPLATES)
166-
unset(CMAKE_REQUIRED_FLAGS)
167-
if(CLANG_HAS_PCH_INSTANTIATE_TEMPLATES)
168-
target_compile_options(trinity-compile-option-interface
169-
INTERFACE
170-
-fpch-instantiate-templates)
171-
endif()

cmake/compiler/msvc/settings.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,15 @@ if(BUILD_SHARED_LIBS)
127127
message(STATUS "MSVC: Enabled shared linking")
128128
endif()
129129

130-
# Move some warnings that are enabled for other compilers from level 4 to level 3
130+
# Move some warnings that are enabled for other compilers from level 4 to level 3 and enable some warnings which are off by default
131131
target_compile_options(trinity-compile-option-interface
132132
INTERFACE
133-
/w34100 # C4100 'identifier' : unreferenced formal parameter
133+
/w15038 # C5038: data member 'member1' will be initialized after data member 'member2'
134+
/w34100 # C4100: 'identifier' : unreferenced formal parameter
134135
/w34101 # C4101: 'identifier' : unreferenced local variable
135136
/w34189 # C4189: 'identifier' : local variable is initialized but not referenced
136137
/w34389 # C4389: 'equality-operator' : signed/unsigned mismatch
137-
/w35054) # C5054: 'operator 'operator-name': deprecated between enumerations of different types'
138+
/w35054) # C5054: 'operator 'operator-name': deprecated between enumerations of different types'
138139

139140
# Enable and treat as errors the following warnings to easily detect virtual function signature failures:
140141
# 'function' : member function does not override any base class virtual member function

cmake/genrev.cmake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,15 @@ cmake_host_system_information(RESULT TRINITY_BUILD_HOST_SYSTEM QUERY OS_NAME)
126126
cmake_host_system_information(RESULT TRINITY_BUILD_HOST_DISTRO QUERY DISTRIB_INFO)
127127
cmake_host_system_information(RESULT TRINITY_BUILD_HOST_SYSTEM_RELEASE QUERY OS_RELEASE)
128128
# on windows OS_RELEASE contains sub-type string tag like "Professional" instead of a version number and OS_VERSION has only build number
129-
# so we grab that from cmd "ver" command
129+
# so we grab that with Get-CimInstance powershell cmdlet
130130
if(WIN32)
131131
execute_process(
132-
COMMAND cmd /c ver
132+
COMMAND powershell -NoProfile -Command "$v=(Get-CimInstance -ClassName Win32_OperatingSystem); '{0} ({1})' -f $v.Caption, $v.Version"
133133
OUTPUT_VARIABLE TRINITY_BUILD_HOST_SYSTEM_RELEASE
134+
OUTPUT_STRIP_TRAILING_WHITESPACE
134135
)
135-
string(STRIP ${TRINITY_BUILD_HOST_SYSTEM_RELEASE} TRINITY_BUILD_HOST_SYSTEM_RELEASE)
136-
string(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" TRINITY_BUILD_HOST_SYSTEM_RELEASE ${TRINITY_BUILD_HOST_SYSTEM_RELEASE})
136+
# Remove "Microsoft Windows" from the result
137+
string(REGEX REPLACE "^.* Windows " "" TRINITY_BUILD_HOST_SYSTEM_RELEASE ${TRINITY_BUILD_HOST_SYSTEM_RELEASE})
137138
endif()
138139

139140
if(CMAKE_SCRIPT_MODE_FILE)

0 commit comments

Comments
 (0)