aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-01-01 00:26:53 +0100
committerShauren <shauren.trinity@gmail.com>2023-08-12 14:24:30 +0200
commit97c977d0fba75183f58062f124402530a91dac9b (patch)
tree2978994b07dfcec014e9be42d379dde01d9888df
parent85fc9d93b5e89d09b61a271e05e7de8a3dca2359 (diff)
Build: Update required compilers to current debian stable and VS 2022
GCC: 10 Clang: 11 MSVC: 2022 (cherry picked from commit 0a1b40241a12b2b2f4549edf0ee263e91236145b)
-rw-r--r--.github/workflows/gcc-build.yml4
-rw-r--r--cmake/compiler/clang/settings.cmake2
-rw-r--r--cmake/compiler/gcc/settings.cmake2
-rw-r--r--cmake/compiler/msvc/settings.cmake13
4 files changed, 9 insertions, 12 deletions
diff --git a/.github/workflows/gcc-build.yml b/.github/workflows/gcc-build.yml
index 4438a1ae89e..73830ebbd5a 100644
--- a/.github/workflows/gcc-build.yml
+++ b/.github/workflows/gcc-build.yml
@@ -11,8 +11,8 @@ jobs:
- uses: actions/checkout@v2
- name: Dependencies
run: |
- sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-8
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-8
+ sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-10
+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
- name: Setup
run: |
mkdir bin
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake
index 896dd0ef157..02bdc8e2583 100644
--- a/cmake/compiler/clang/settings.cmake
+++ b/cmake/compiler/clang/settings.cmake
@@ -3,7 +3,7 @@ target_compile_definitions(trinity-compile-option-interface
INTERFACE
-D_BUILD_DIRECTIVE="$<CONFIG>")
-set(CLANG_EXPECTED_VERSION 7.0.0)
+set(CLANG_EXPECTED_VERSION 11.0.0)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)
message(FATAL_ERROR "Clang: TrinityCore requires version ${CLANG_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake
index d0f7ebc2f3f..6608190d1bf 100644
--- a/cmake/compiler/gcc/settings.cmake
+++ b/cmake/compiler/gcc/settings.cmake
@@ -3,7 +3,7 @@ target_compile_definitions(trinity-compile-option-interface
INTERFACE
-D_BUILD_DIRECTIVE="$<CONFIG>")
-set(GCC_EXPECTED_VERSION 8.3.0)
+set(GCC_EXPECTED_VERSION 10.0.0)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index cdc3f1b6acf..f6947d6eaad 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -1,8 +1,8 @@
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-set(MSVC_EXPECTED_VERSION 19.24)
-set(MSVC_EXPECTED_VERSION_STRING "Microsoft Visual Studio 2019 16.4")
+set(MSVC_EXPECTED_VERSION 19.30)
+set(MSVC_EXPECTED_VERSION_STRING "Microsoft Visual Studio 2022 17")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVC_EXPECTED_VERSION)
message(FATAL_ERROR "MSVC: TrinityCore requires version ${MSVC_EXPECTED_VERSION} (${MSVC_EXPECTED_VERSION_STRING}) to build but found ${CMAKE_CXX_COMPILER_VERSION}")
@@ -88,12 +88,9 @@ endif()
# that the program will eventually be linked with a conforming operator new implementation,
# and can omit all of these extra null checks from your program.
# http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx
-if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.23026.0))
- # makes this flag a requirement to build TC at all
- target_compile_options(trinity-compile-option-interface
- INTERFACE
- /Zc:throwingNew)
-endif()
+target_compile_options(trinity-compile-option-interface
+ INTERFACE
+ /Zc:throwingNew)
# Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns
target_compile_definitions(trinity-compile-option-interface