Skip to content

Commit

Permalink
Add LLVM installation check in cmake exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ggeorgakoudis committed Jan 22, 2025
1 parent 94ee349 commit 645ff03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/proteusConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@PACKAGE_INIT@

set(PROTEUS_LLVM_DIR @LLVM_DIR@)
find_package(LLVM REQUIRED CONFIG)
if (NOT "${LLVM_DIR}" STREQUAL "${PROTEUS_LLVM_DIR}")
message(FATAL_ERROR "Mismatch between target LLVM_DIR = ${LLVM_DIR} "
"and Proteus LLVM_DIR = ${PROTEUS_LLVM_DIR}. "
"Use the same LLVM installation when compiling.")
endif()
find_package(LLD REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/proteusTargets.cmake")
Expand Down

0 comments on commit 645ff03

Please sign in to comment.