aboutsummaryrefslogtreecommitdiff
path: root/cmake/compiler/clang/settings.cmake
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-04-10 00:08:32 +0200
committerShauren <shauren.trinity@gmail.com>2023-04-10 00:08:32 +0200
commit083b8d6c846cfdf75abb1fae481a3eeb25c13c56 (patch)
tree332ad0b73ee8f4ea1f9bc75d1018d09a473bc60f /cmake/compiler/clang/settings.cmake
parent9c367e2f21f5ce3859e5e7032fb8d564fe1b3bf4 (diff)
Core/Misc: Fix build with libc++
Closes #28909
Diffstat (limited to 'cmake/compiler/clang/settings.cmake')
-rw-r--r--cmake/compiler/clang/settings.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake
index f6e95030b57..6cfc8ff30aa 100644
--- a/cmake/compiler/clang/settings.cmake
+++ b/cmake/compiler/clang/settings.cmake
@@ -6,6 +6,11 @@ target_compile_definitions(trinity-compile-option-interface
-D_BUILD_DIRECTIVE="$<CONFIG>")
set(CLANG_EXPECTED_VERSION 11.0.0)
+if(CMAKE_CXX_COMPILER MATCHES "Clang")
+ # apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang
+ # version number pulled from https://en.wikipedia.org/wiki/Xcode#Toolchain_versions for row matching LLVM 11
+ set(CLANG_EXPECTED_VERSION 12.0.5)
+endif()
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}")