From e04ab39036ebbae02e3f3007ffc9f1bd6d44c7a3 Mon Sep 17 00:00:00 2001 From: Martin Hafskjold Thoresen Date: Sun, 7 Nov 2021 17:25:20 +0100 Subject: [PATCH] Cmake: Specify LLVM versions Systems with multiple LLVM toolchains installed (e.g. one globally and one in $HOME/local) would get confused and fail to compile. Being explicit about the version required will force CMake to find the right version of LLVM. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2839a3cffc..1b427bb30b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,9 +104,9 @@ else() set(ZIG_USE_LLVM_CONFIG OFF CACHE BOOL "use llvm-config to find LLVM libraries") endif() -find_package(llvm) -find_package(clang) -find_package(lld) +find_package(llvm 13) +find_package(clang 13) +find_package(lld 13) if(ZIG_STATIC_ZLIB) list(REMOVE_ITEM LLVM_LIBRARIES "-lz")