summaryrefslogtreecommitdiff
path: root/lldb/CMakeLists.txt
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-23 14:47:50 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-24 15:51:43 +0200
commit52f39853abd46495a6d636c4b035e1b92cf4b833 (patch)
tree6bf7b567c41e54d6732d5f66b71a94f532ec1e59 /lldb/CMakeLists.txt
parente28e214e4f225080104811aec5295fa062006515 (diff)
downloadllvm-52f39853abd46495a6d636c4b035e1b92cf4b833.tar.gz
[lldb] Include gtest in standalone build only if LLDB_INCLUDE_TESTS
Build gtest targets when building standalone only if LLDB_INCLUDE_TESTS is true. Prior to this change, they were built whenever LLVM_MAIN_SRC_DIR was available, independently whether tests themselves would be run. Differential Revision: https://reviews.llvm.org/D136551
Diffstat (limited to 'lldb/CMakeLists.txt')
-rw-r--r--lldb/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index 88a8f0a65139..12ba8a9d79e2 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -17,6 +17,8 @@ endif()
# 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 @@ if (NOT TARGET llvm_gtest)
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)