Skip to content

Commit

Permalink
Commented out LLVM version warning as it can lead to errors in finding
Browse files Browse the repository at this point in the history
LLVM in subprojects.
  • Loading branch information
m-kurtenacker committed Jun 28, 2024
1 parent 9b5795c commit a5ebcf6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cmake/llvm-package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ set(AnyDSL_PKG_LLVM_VERSION "16.0.6" CACHE STRING "LLVM version of AnyDSL")
set(AnyDSL_PKG_LLVM_URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${AnyDSL_PKG_LLVM_VERSION}/llvm-project-${AnyDSL_PKG_LLVM_VERSION}.src.tar.xz" CACHE STRING "where to download LLVM")


find_package(LLVM ${AnyDSL_PKG_LLVM_VERSION} QUIET CONFIG)
if (NOT LLVM_FOUND AND NOT CMAKE_DISABLE_FIND_PACKAGE_LLVM)
find_package(LLVM QUIET CONFIG)
if (NOT LLVM_FOUND)
message(WARNING
"LLVM not found. This is probably not what you want to do. You can either set AnyDSL_PKG_LLVM_AUTOBUILD to ON, or set LLVM_DIR to point to LLVM ${AnyDSL_PKG_LLVM_VERSION}.
You can get also rid of this warning by setting CMAKE_DISABLE_FIND_PACKAGE_LLVM to ON.")
else()
message(WARNING
"LLVM ${LLVM_VERSION} found, but this version does not match what AnyDSL expects. This is probably not what you want to do. You can either set AnyDSL_PKG_LLVM_AUTOBUILD to ON, or set LLVM_DIR to point to LLVM ${AnyDSL_PKG_LLVM_VERSION}.
You can also get rid of this warning by setting AnyDSL_PKG_LLVM_VERSION to ${LLVM_VERSION}, or by enabling CMAKE_DISABLE_FIND_PACKAGE_LLVM.")
endif()
endif()
#find_package(LLVM ${AnyDSL_PKG_LLVM_VERSION} QUIET CONFIG)
#if (NOT LLVM_FOUND AND NOT CMAKE_DISABLE_FIND_PACKAGE_LLVM)
# find_package(LLVM QUIET CONFIG)
# if (NOT LLVM_FOUND)
# message(WARNING
#"LLVM not found. This is probably not what you want to do. You can either set AnyDSL_PKG_LLVM_AUTOBUILD to ON, or set LLVM_DIR to point to LLVM ${AnyDSL_PKG_LLVM_VERSION}.
#You can get also rid of this warning by setting CMAKE_DISABLE_FIND_PACKAGE_LLVM to ON.")
# else()
# message(WARNING
#"LLVM ${LLVM_VERSION} found, but this version does not match what AnyDSL expects. This is probably not what you want to do. You can either set AnyDSL_PKG_LLVM_AUTOBUILD to ON, or set LLVM_DIR to point to LLVM ${AnyDSL_PKG_LLVM_VERSION}.
#You can also get rid of this warning by setting AnyDSL_PKG_LLVM_VERSION to ${LLVM_VERSION}, or by enabling CMAKE_DISABLE_FIND_PACKAGE_LLVM.")
# endif()
#endif()

if(AnyDSL_PKG_LLVM_AUTOBUILD AND NOT CMAKE_DISABLE_FIND_PACKAGE_LLVM)
include(FetchContent)
Expand Down

0 comments on commit a5ebcf6

Please sign in to comment.