diff options
| author | Shauren <shauren.trinity@gmail.com> | 2022-02-16 20:22:15 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2024-02-26 12:16:13 +0100 |
| commit | c7034976554b2a4e250f551d609b01bafbad8f51 (patch) | |
| tree | 5179bdce6d627d10fe6059733400a8e572792a54 /cmake/compiler | |
| parent | 0ce6a573a6c96ee50c028f75ca852da892be6b24 (diff) | |
Build: Partial support for clang-cl
(cherry picked from commit 0b846b2107569209d6bb0106f3075b624c713244)
Diffstat (limited to 'cmake/compiler')
| -rw-r--r-- | cmake/compiler/msvc/settings.cmake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index 2d59242d32f..4ea2d764e2e 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.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}") -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 |
