[Lldb-commits] [PATCH] D136551: [lldb] Include gtest in standalone build only if LLDB_INCLUDE_TESTS
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 24 06:52:12 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG52f39853abd4: [lldb] Include gtest in standalone build only if LLDB_INCLUDE_TESTS (authored by mgorny).
Herald added a project: LLDB.
Changed prior to commit:
https://reviews.llvm.org/D136551?vs=469980&id=470133#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136551/new/
https://reviews.llvm.org/D136551
Files:
lldb/CMakeLists.txt
lldb/cmake/modules/LLDBStandalone.cmake
Index: lldb/cmake/modules/LLDBStandalone.cmake
===================================================================
--- lldb/cmake/modules/LLDBStandalone.cmake
+++ lldb/cmake/modules/LLDBStandalone.cmake
@@ -103,16 +103,18 @@
"${LLVM_INCLUDE_DIRS}"
"${CLANG_INCLUDE_DIRS}")
-# Build the gtest library needed for unittests, if we have LLVM sources
-# handy.
-if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET llvm_gtest)
- add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
-endif()
-# LLVMTestingSupport library is needed for Process/gdb-remote.
-if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
- AND NOT TARGET LLVMTestingSupport)
- add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
- lib/Testing/Support)
+if(LLDB_INCLUDE_TESTS)
+ # Build the gtest library needed for unittests, if we have LLVM sources
+ # handy.
+ if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET llvm_gtest)
+ add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
+ endif()
+ # LLVMTestingSupport library is needed for Process/gdb-remote.
+ if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
+ AND NOT TARGET LLVMTestingSupport)
+ add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
+ lib/Testing/Support)
+ endif()
endif()
option(LLVM_USE_FOLDERS "Enable solution folders in Visual Studio. Disable for Express versions." ON)
Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -17,6 +17,8 @@
# Must go below project(..)
include(GNUInstallDirs)
+option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS})
+
if(LLDB_BUILT_STANDALONE)
include(LLDBStandalone)
@@ -129,7 +131,6 @@
set(LLDB_INCLUDE_UNITTESTS OFF)
endif()
-option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS})
if(LLDB_INCLUDE_TESTS)
add_subdirectory(test)
if (LLDB_INCLUDE_UNITTESTS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136551.470133.patch
Type: text/x-patch
Size: 2038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221024/0d3e26e1/attachment-0001.bin>
More information about the lldb-commits
mailing list