Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support disabling llvm path #1861

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions enzyme/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ message( LLVM_SHLIBEXT = ${LLVM_SHLIBEXT} )

set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}")

get_filename_component(LLVM_ABSOLUTE_DIR
"${LLVM_DIR}"
REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
option(ENZYME_REWRITE_ABSOLUTE_LLVM "Rewrite LLVM path to be absolute" ON)

if (ENZYME_REWRITE_ABSOLUTE_LLVM)
get_filename_component(LLVM_ABSOLUTE_DIR
"${LLVM_DIR}"
REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")

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

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