mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 21:21:37 +00:00
fix(tidy): find LLVM and Clang of the same installation
- Enable the C language before find_package(LLVM): LLVMConfig.cmake runs C compile checks and fails without it, e.g. with LLVM 17 on Ubuntu. - Look for Clang next to the found LLVM first. Before, a failed LLVM lookup let Clang pull in another LLVM version silently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -80,8 +80,9 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
|
||||
if(BUILD_TIDY_TOOL)
|
||||
enable_language(C) # LLVMConfig.cmake runs C compile checks
|
||||
find_package2(PRIVATE LLVM REQUIRED)
|
||||
find_package2(PRIVATE Clang REQUIRED)
|
||||
find_package2(PRIVATE Clang REQUIRED CONFIG HINTS "${LLVM_LIBRARY_DIR}/cmake/clang")
|
||||
set(Clang_VERSION ${LLVM_VERSION})
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user