Commit e04ab39036

Martin Hafskjold Thoresen <git@mht.wtf>
2021-11-07 17:25:20
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.
1 parent 3534f8a
Changed files (1)
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")