File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,21 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2424
2525 set (CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to" )
2626
27- set (LLVM_SOURCE_DIR ${CMAKE_SOURCE_DIR} /llvm-project/llvm)
2827 message (STATUS "Searching for MLIRConfig.cmake in: ${MLIR_DIR} " )
2928 find_package (MLIR REQUIRED CONFIG)
3029
3130 set (Clang_DIR ${CLANG_DIR} )
3231 message (STATUS "Searching for ClangConfig.cmake in: ${Clang_DIR} " )
3332 find_package (Clang REQUIRED CONFIG)
3433
34+ # This is exported if we are building against a build area. If
35+ # building against an install area, then assume we're using the
36+ # submodule.
37+ if (NOT LLVM_BUILD_MAIN_SRC_DIR)
38+ set (LLVM_BUILD_MAIN_SRC_DIR ${CMAKE_SOURCE_DIR} /llvm-project/llvm)
39+ endif ()
40+ set (LLVM_SOURCE_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE STRING "Location of LLVM source" )
41+
3542 message (STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR} " )
3643 message (STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR} " )
3744 message (STATUS "Using ClangConfig.cmake in: ${CLANG_DIR} " )
You can’t perform that action at this time.
0 commit comments