Build: Update required compilers to current debian stable and VS 2022

GCC: 10
Clang: 11
MSVC: 2022
This commit is contained in:
Shauren
2023-01-01 00:26:53 +01:00
parent ba9bbbc9d0
commit 0a1b40241a
5 changed files with 11 additions and 27 deletions

View File

@@ -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

View File

@@ -5,7 +5,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}")

View File

@@ -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}")

View File

@@ -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")
# This file is also used by compilers that pretend to be MSVC but report their own version number - don't version check them
if(NOT CMAKE_CXX_COMPILER_FRONTEND_VARIANT)
@@ -91,12 +91,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

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.8)
project(protoc_bnet)
set(CXX_EXTENSIONS OFF)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(Protobuf REQUIRED)
@@ -21,20 +21,7 @@ include_directories(${CMAKE_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIRS})
add_executable(protoc-gen-bnet ${SOURCE_FILES})
target_compile_features(protoc-gen-bnet
PUBLIC
cxx_std_17
cxx_alias_templates
cxx_auto_type
cxx_constexpr
cxx_decltype
cxx_decltype_auto
cxx_final
cxx_lambdas
cxx_generic_lambdas
cxx_variadic_templates
cxx_defaulted_functions
cxx_nullptr
cxx_trailing_return_types
cxx_return_type_deduction)
cxx_std_17)
target_link_libraries(protoc-gen-bnet ${PROTOBUF_PROTOC_LIBRARIES} ${PROTOBUF_LIBRARIES})