aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/compiler/msvc/settings.cmake11
-rw-r--r--cmake/platform/win/settings.cmake2
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp6
3 files changed, 14 insertions, 5 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index 6879a38d8aa..34d9dcf81b1 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -4,10 +4,13 @@ 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")
-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}")
-else()
- message(STATUS "MSVC: Minimum version required is ${MSVC_EXPECTED_VERSION}, found ${CMAKE_CXX_COMPILER_VERSION} - ok!")
+# 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)
+ 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}")
+ else()
+ message(STATUS "MSVC: Minimum version required is ${MSVC_EXPECTED_VERSION}, found ${CMAKE_CXX_COMPILER_VERSION} - ok!")
+ endif()
endif()
# CMake sets warning flags by default, however we manage it manually
diff --git a/cmake/platform/win/settings.cmake b/cmake/platform/win/settings.cmake
index 60614b1ec6e..5bf3439a203 100644
--- a/cmake/platform/win/settings.cmake
+++ b/cmake/platform/win/settings.cmake
@@ -2,7 +2,7 @@ add_definitions(-D_WIN32_WINNT=0x0601)
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-DNOMINMAX)
-if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
include(${CMAKE_SOURCE_DIR}/cmake/compiler/msvc/settings.cmake)
elseif(CMAKE_CXX_PLATFORM_ID MATCHES "MinGW")
include(${CMAKE_SOURCE_DIR}/cmake/compiler/mingw/settings.cmake)
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp
index f0754971afa..f9b7c4ac8b1 100644
--- a/src/common/Debugging/WheatyExceptionReport.cpp
+++ b/src/common/Debugging/WheatyExceptionReport.cpp
@@ -7,6 +7,12 @@
#include "Errors.h"
#include "GitRevision.h"
#include <algorithm>
+
+#ifdef __clang__
+// clang-cl doesn't have these hardcoded types available, correct ehdata_forceinclude.h that relies on it
+#define _ThrowInfo ThrowInfo
+#endif
+
#include <ehdata.h>
#include <rttidata.h>
#include <tlhelp32.h>