You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 3rdparty/llvm/CMakeLists.txt
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -58,12 +58,18 @@ if(WITH_LLVM)
58
58
else()
59
59
message(STATUS"Using prebuilt or system LLVM")
60
60
61
+
if(WIN32)
62
+
set(FIND_LLVM_VERSION "19.1"CACHESTRING"LLVM version to search for.")
63
+
else()
64
+
set(FIND_LLVM_VERSION "21.1"CACHESTRING"LLVM version to search for.")
65
+
end()
66
+
61
67
if (LLVM_DIR ANDNOTIS_ABSOLUTE"${LLVM_DIR}")
62
68
# change relative LLVM_DIR to be relative to the source dir
63
69
set(LLVM_DIR ${CMAKE_SOURCE_DIR}/${LLVM_DIR})
64
70
endif()
65
71
66
-
find_package(LLVMCONFIG)
72
+
find_package(LLVM${FIND_LLVM_VERSION}CONFIG)
67
73
68
74
if (NOT LLVM_FOUND)
69
75
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