Skip to content

Commit 61197a3

Browse files
committed
[interpreter] Set LLVM_DIR for builtin_llvm
This allows using the variable to find a system-installed LLVM with builtin_llvm=OFF.
1 parent 8faf9bc commit 61197a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

interpreter/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ if(NOT experimental_adaptivecpp)
5959
set(CMAKE_DISABLE_FIND_PACKAGE_CUDA ON)
6060
endif()
6161

62-
# will be set again in case NOT builtin_llvm
63-
set(LLVM_DIR "${CMAKE_CURRENT_BINARY_DIR}/llvm-project/llvm")
6462
if (clad)
6563
set(CLING_BUILD_PLUGINS ON)
6664
endif()
@@ -252,6 +250,8 @@ if(builtin_llvm)
252250
set(CMAKE_CXX_STANDARD ${_cxx_standard})
253251
set(CMAKE_BUILD_TYPE ${_build_type})
254252

253+
# Needed to make Cling plugins (clad) find LLVM.
254+
set(LLVM_DIR "${CMAKE_CURRENT_BINARY_DIR}/llvm-project/llvm")
255255
set(LLVM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/llvm-project/llvm/include
256256
${CMAKE_CURRENT_BINARY_DIR}/llvm-project/llvm/include
257257
CACHE STRING "LLVM include directories."

0 commit comments

Comments
 (0)