Skip to content

Commit

Permalink
Provide fallback for LLVM_INCLUDE_DIRS
Browse files Browse the repository at this point in the history
In standalone builds, it could otherwise happen that the variable is
not set during the first CMake invocation and tests fail because they
are unable to locate the LLVM headers.
  • Loading branch information
hahnjo authored and jenkins committed Dec 5, 2023
1 parent cbd1dcf commit aacb57a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ else()
set (CLANG_INCLUDE_DIRS "${CLANG_INCLUDE_DIRS}"
"${LLVM_BINARY_DIR}/tools/clang/include")
endif()
if (NOT LLVM_INCLUDE_DIRS)
set (LLVM_INCLUDE_DIRS "${LLVM_MAIN_SRC_DIR}/include" "${LLVM_BINARY_DIR}/include")
endif()
endif()

if( NOT "NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
Expand Down

0 comments on commit aacb57a

Please sign in to comment.