Skip to content

Commit

Permalink
[cmake] Add variables for extra hints where the clang and llvm config…
Browse files Browse the repository at this point in the history
…s are.

This allows us to control externally the find_package machinery to discover
non-canonical setups such as the one in the ROOT project when using external
llvm and builtin clang.
  • Loading branch information
alexander-penev authored and vgvassilev committed Jul 12, 2021
1 parent f8eb9d2 commit a320ffd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
endif()

if (NOT LLVM_FOUND AND DEFINED LLVM_DIR)
find_package(LLVM REQUIRED CONFIG PATHS ${LLVM_DIR} "${LLVM_DIR}/lib/cmake/llvm" "${LLVM_DIR}/cmake" NO_DEFAULT_PATH)
find_package(LLVM REQUIRED CONFIG PATHS ${LLVM_DIR} "${LLVM_DIR}/lib/cmake/llvm" "${LLVM_DIR}/cmake" "${LLVM_CONFIG_EXTRA_PATH_HINTS}" NO_DEFAULT_PATH)
endif()

if (NOT LLVM_FOUND)
Expand Down Expand Up @@ -99,7 +99,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
endif()

if (NOT Clang_FOUND AND DEFINED Clang_DIR)
find_package(Clang REQUIRED CONFIG PATHS ${Clang_DIR} "${Clang_DIR}/lib/cmake/clang" "${Clang_DIR}/cmake" NO_DEFAULT_PATH)
find_package(Clang REQUIRED CONFIG PATHS ${Clang_DIR} "${Clang_DIR}/lib/cmake/clang" "${Clang_DIR}/cmake" "${Clang_CONFIG_EXTRA_PATH_HINTS}" NO_DEFAULT_PATH)
endif()

if (NOT Clang_FOUND)
Expand Down

0 comments on commit a320ffd

Please sign in to comment.