https://github.com/ferdymercury created https://github.com/llvm/llvm-project/pull/218965
Alternative to https://github.com/llvm/llvm-project/pull/135570 >From 6d892b36ff5790787d7be37ecf5ce4d35227a91a Mon Sep 17 00:00:00 2001 From: ferdymercury <[email protected]> Date: Wed, 26 Aug 2026 17:46:17 +0200 Subject: [PATCH] [clang] prevent double package search if LLVM already found in parent directory Alternative to https://github.com/llvm/llvm-project/pull/135570 --- clang/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index f8d57839805cb..760a38701e9b3 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -45,7 +45,9 @@ if(CLANG_BUILT_STANDALONE) mark_as_advanced(LLVM_ENABLE_ASSERTIONS) endif() - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") + if(NOT LLVM_FOUND) + find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") + endif() list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") # Turn into CACHE PATHs for overwritting _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
