aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Findllvm.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
index a26339dc34..d149d6631f 100644
--- a/cmake/Findllvm.cmake
+++ b/cmake/Findllvm.cmake
@@ -15,6 +15,15 @@ find_program(LLVM_CONFIG_EXE
"c:/msys64/mingw64/bin"
"C:/Libraries/llvm-8.0.0/bin")
+execute_process(
+ COMMAND ${LLVM_CONFIG_EXE} --version
+ OUTPUT_VARIABLE LLVM_CONFIG_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if(LLVM_CONFIG_VERSION VERSION_LESS 7)
+ message(FATAL_ERROR "expected LLVM version >=7 but found ${LLVM_CONFIG_VERSION}")
+endif()
+
if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug") OR ZIG_STATIC)
execute_process(
COMMAND ${LLVM_CONFIG_EXE} --libfiles --link-static