Skip to content

Commit

Permalink
Specify LLVM version in find_package (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
niansa committed May 2, 2024
1 parent cc784f6 commit 2cca488
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if (NOT DEFINED LLVM_VERSION_MAJOR)
project(llvm-cbe)
set (USE_SYSTEM_LLVM 1)
cmake_minimum_required(VERSION 3.4.3)
find_package(LLVM REQUIRED CONFIG)
find_package(LLVM 17 REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
message(STATUS "LLVM_INCLUDE_DIRS: ${LLVM_INCLUDE_DIRS}")
Expand All @@ -15,10 +15,6 @@ if (NOT DEFINED LLVM_VERSION_MAJOR)
set (CMAKE_CXX_STANDARD 17)
endif()

if(NOT LLVM_VERSION_MAJOR EQUAL 17)
message(FATAL_ERROR "This project only supports LLVM 17. For older versions of LLVM please check https://github.com/JuliaHubOSS/llvm-cbe/tags")
endif()

add_subdirectory(lib)
add_subdirectory(tools)

Expand Down

0 comments on commit 2cca488

Please sign in to comment.