commit e04ab39036ebbae02e3f3007ffc9f1bd6d44c7a3 (tree)
parent 3534f8a3eda03c412e71970fa1f1ce9de49404b7
Author: Martin Hafskjold Thoresen <git@mht.wtf>
Date: Sun, 7 Nov 2021 17:25:20 +0100
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.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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")