diff options
author | Treeston <treeston.mmoc@gmail.com> | 2020-08-24 17:44:38 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-02-04 00:27:13 +0100 |
commit | cfcfe71097693023127a8ee8ac77ad5b4362e73e (patch) | |
tree | 24a20afffe87848032713fc688b99c410bdb01df /cmake/compiler/clang/settings.cmake | |
parent | f7ed56f2329d5a73e3440578844a9274d6a787cf (diff) |
Build: Add Clang version guard to CMake (PR #25324)
(cherry picked from commit 27b1930d97d541c241655d8b820cbaebe6eec44e)
Diffstat (limited to 'cmake/compiler/clang/settings.cmake')
-rw-r--r-- | cmake/compiler/clang/settings.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index 2a3ed8e1dd3..716750d8715 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -5,6 +5,14 @@ target_compile_definitions(trinity-compile-option-interface INTERFACE -D_BUILD_DIRECTIVE="$<CONFIG>") +set(CLANG_EXPECTED_VERSION 7.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}") +else() + message(STATUS "Clang: Minimum version required is ${CLANG_EXPECTED_VERSION}, found ${CMAKE_CXX_COMPILER_VERSION} - ok!") +endif() + if(WITH_WARNINGS) target_compile_options(trinity-warning-interface INTERFACE |