Skip to content

Commit

Permalink
abort compilation if cfg not found (#1881)
Browse files Browse the repository at this point in the history
* abort compilation if cfg not found

* more precise checks

* nicer error
  • Loading branch information
ZuseZ4 committed May 14, 2024
1 parent 759d272 commit cf89592
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions enzyme/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ get_filename_component(LLVM_ABSOLUTE_DIR
"${LLVM_DIR}"
REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")

if (NOT EXISTS "${LLVM_DIR}")
message("Looking for LLVM_DIR at ${LLVM_DIR}")
message(SEND_ERROR "The given LLVM_DIR does not exist. Typo?")
endif()

set(LLVM_DIR "${LLVM_ABSOLUTE_DIR}" CACHE FILEPATH "b" FORCE)

if (EXISTS "${LLVM_DIR}/lib/cmake/llvm/LLVMConfig.cmake")
Expand Down

0 comments on commit cf89592

Please sign in to comment.