Skip to content

Commit

Permalink
Merge pull request #166 from frasercrmck/bump-max-llvm-ver
Browse files Browse the repository at this point in the history
Support all LLVM versions with same maximum major version
  • Loading branch information
frasercrmck authored Oct 17, 2023
2 parents bfe7302 + 7eb953d commit 88ec0bb
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cmake/ImportLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,23 @@ include(DetectLLVMMSVCCRT)
a supported version.
#]=======================================================================]
set(CA_LLVM_MINIMUM_VERSION 16.0.0)
set(CA_LLVM_MAXIMUM_VERSION 17.0.1)
set(CA_LLVM_MAXIMUM_VERSION 17)
string(REPLACE ";" "', '" CA_LLVM_VERSIONS_PRETTY "${CA_LLVM_VERSIONS}")
if("${LLVM_PACKAGE_VERSION}" VERSION_LESS "${CA_LLVM_MINIMUM_VERSION}")
message(FATAL_ERROR
"LLVM version '${LLVM_PACKAGE_VERSION}' is not supported. oneAPI Construction Kit "
"supports released versions between: "
"'${CA_LLVM_MINIMUM_VERSION}' and '${CA_LLVM_MAXIMUM_VERSION}'.")
"LLVM version '${LLVM_PACKAGE_VERSION}' is not supported. oneAPI
Construction Kit " "supports released versions between: "
"'${CA_LLVM_MINIMUM_VERSION}' and '${CA_LLVM_MAXIMUM_VERSION}.x'.")
else()
if("${LLVM_PACKAGE_VERSION}" VERSION_GREATER "${CA_LLVM_MAXIMUM_VERSION}")
# We notionally support all minor/patch versions of our maximum supported
# LLVM major version. Grab the *next* version after this, to warn users that
# they may be using a newer untested/unsupported version of LLVM.
MATH(EXPR MAX_LLVM_VER_PLUS_ONE "${CA_LLVM_MAXIMUM_VERSION}+1")
if("${LLVM_PACKAGE_VERSION}" VERSION_GREATER_EQUAL "${MAX_LLVM_VER_PLUS_ONE}")
message(AUTHOR_WARNING
"Build with LLVM version '${LLVM_PACKAGE_VERSION}' which is not "
"supported. oneAPI Construction Kit supports released versions between: "
"'${CA_LLVM_MINIMUM_VERSION}' and '${CA_LLVM_MAXIMUM_VERSION}'.")
"'${CA_LLVM_MINIMUM_VERSION}' and '${CA_LLVM_MAXIMUM_VERSION}.x'.")
endif()
endif()
message(STATUS "oneAPI Construction Kit using LLVM ${LLVM_PACKAGE_VERSION}")
Expand Down

0 comments on commit 88ec0bb

Please sign in to comment.