aboutsummaryrefslogtreecommitdiff
path: root/lit/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /lit/CMakeLists.txt
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
downloadsrc-14f1b3e8826ce43b978db93a62d1166055db5394.tar.gz
src-14f1b3e8826ce43b978db93a62d1166055db5394.zip
Vendor import of lldb trunk r290819:vendor/lldb/lldb-trunk-r290819
Notes
Notes: svn path=/vendor/lldb/dist/; revision=311128 svn path=/vendor/lldb/lldb-trunk-r290819/; revision=311129; tag=vendor/lldb/lldb-trunk-r290819
Diffstat (limited to 'lit/CMakeLists.txt')
-rw-r--r--lit/CMakeLists.txt36
1 files changed, 34 insertions, 2 deletions
diff --git a/lit/CMakeLists.txt b/lit/CMakeLists.txt
index 48f778fbe3d2..07d490619649 100644
--- a/lit/CMakeLists.txt
+++ b/lit/CMakeLists.txt
@@ -11,6 +11,10 @@ else()
set(ENABLE_SHARED 0)
endif(BUILD_SHARED_LIBS)
+option(LLDB_TEST_CLANG "Use in-tree clang when testing lldb" Off)
+set(LLDB_TEST_C_COMPILER "" CACHE STRING "C compiler to use when testing LLDB")
+set(LLDB_TEST_CXX_COMPILER "" CACHE STRING "C++ compiler to use when testing LLDB")
+
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
@@ -21,16 +25,44 @@ configure_lit_site_cfg(
set(LLDB_TEST_DEPS
LLDBUnitTests
+ lldb
)
+
+if(NOT LLDB_BUILT_STANDALONE)
+ list(APPEND LLDB_TEST_DEPS FileCheck not)
+endif()
+
+# lldb-server is not built on every platform.
+if (TARGET lldb-server)
+ list(APPEND LLDB_TEST_DEPS lldb-server)
+endif()
+
+if(APPLE)
+ list(APPEND LLDB_TEST_DEPS debugserver)
+endif()
+
+if(LLDB_TEST_CLANG)
+ if(LLDB_TEST_C_COMPILER OR LLDB_TEST_CXX_COMPILER)
+ message(SEND_ERROR "Cannot override LLDB_TEST_<LANG>_COMPILER and set LLDB_TEST_CLANG.")
+ endif()
+ list(APPEND LLDB_TEST_DEPS clang)
+endif()
+
set(LLDB_TEST_PARAMS
lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
)
-add_lit_testsuite(check-lldb-unit "Running lldb unit test suite"
+add_lit_testsuite(check-lldb-lit "Running lldb lit test suite"
${CMAKE_CURRENT_BINARY_DIR}
PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
DEPENDS ${LLDB_TEST_DEPS}
)
-set_target_properties(check-lldb-unit PROPERTIES FOLDER "LLDB tests")
+set_target_properties(check-lldb-lit PROPERTIES FOLDER "LLDB tests")
+
+add_lit_testsuites(LLDB ${CMAKE_CURRENT_SOURCE_DIR}
+ PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+ lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
+ DEPENDS ${LLDB_TEST_DEPS}
+ )