Skip to content

Commit 82b011d

Browse files
committed
Raise LLVM requirement to 21.1 for non-Windows - ignore pre-installed 19 to select llvm-devel
1 parent 053581d commit 82b011d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

3rdparty/llvm/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@ if(WITH_LLVM)
5858
else()
5959
message(STATUS "Using prebuilt or system LLVM")
6060

61+
if(WIN32)
62+
set(FIND_LLVM_VERSION "19.1" CACHE STRING "LLVM version to search for.")
63+
else()
64+
set(FIND_LLVM_VERSION "21.1" CACHE STRING "LLVM version to search for.")
65+
end()
66+
6167
if (LLVM_DIR AND NOT IS_ABSOLUTE "${LLVM_DIR}")
6268
# change relative LLVM_DIR to be relative to the source dir
6369
set(LLVM_DIR ${CMAKE_SOURCE_DIR}/${LLVM_DIR})
6470
endif()
6571

66-
find_package(LLVM CONFIG)
72+
find_package(LLVM ${FIND_LLVM_VERSION} CONFIG)
6773

6874
if (NOT LLVM_FOUND)
6975
message(FATAL_ERROR "Can't find LLVM libraries from the CMAKE_PREFIX_PATH path or LLVM_DIR. Enable BUILD_LLVM option to build LLVM from included as a git submodule.")

0 commit comments

Comments
 (0)