[Lldb-commits] [PATCH] D145964: [lld] Use installed llvm_gtest in standalone builds
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 13 10:25:35 PDT 2023
mgorny created this revision.
mgorny added a reviewer: tstellar.
Herald added a project: All.
mgorny requested review of this revision.
Use the installed llvm_gtest library instead of rebuilding it locally
when standalone builds are used. This change is now required
as otherwise the build fails due to duplicate llvm_gtest target.
This is based on 82169103958583d3320b3a9a1e6542e8d32ef8da <https://reviews.llvm.org/rG82169103958583d3320b3a9a1e6542e8d32ef8da> in clang.
https://reviews.llvm.org/D145964
Files:
lld/CMakeLists.txt
Index: lld/CMakeLists.txt
===================================================================
--- lld/CMakeLists.txt
+++ lld/CMakeLists.txt
@@ -75,11 +75,9 @@
set(LLVM_UTILS_PROVIDED ON)
set(LLD_TEST_DEPS FileCheck not)
endif()
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
- add_subdirectory(${UNITTEST_DIR} third-party/unittest)
+
+ if (NOT TARGET llvm_gtest)
+ message(FATAL_ERROR "llvm-gtest not found. Please install llvm-gtest or disable tests with -DLLVM_INCLUDE_TESTS=OFF")
endif()
else()
# Seek installed Lit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145964.504743.patch
Type: text/x-patch
Size: 826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230313/1511199e/attachment.bin>
More information about the lldb-commits
mailing list