[Lldb-commits] [lldb] r316800 - [CMake] Build clang as dependency when using in-tree clang for tests.
Davide Italiano via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 27 14:22:57 PDT 2017
Author: davide
Date: Fri Oct 27 14:22:57 2017
New Revision: 316800
URL: http://llvm.org/viewvc/llvm-project?rev=316800&view=rev
Log:
[CMake] Build clang as dependency when using in-tree clang for tests.
Discussed with Zachary Turner and Pavel Labath on lldb-dev.
Let's hope this doesn't break anything :)
Modified:
lldb/trunk/lit/CMakeLists.txt
lldb/trunk/test/CMakeLists.txt
Modified: lldb/trunk/lit/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/CMakeLists.txt?rev=316800&r1=316799&r2=316800&view=diff
==============================================================================
--- lldb/trunk/lit/CMakeLists.txt (original)
+++ lldb/trunk/lit/CMakeLists.txt Fri Oct 27 14:22:57 2017
@@ -54,6 +54,12 @@ add_lit_testsuite(check-lldb-lit "Runnin
set_target_properties(check-lldb-lit PROPERTIES FOLDER "LLDB tests")
+# If we're building with an in-tree clang, then list clang as a dependency
+# to run tests.
+if (TARGET clang)
+ add_dependencies(check-lldb-lit clang)
+endif()
+
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
Modified: lldb/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=316800&r1=316799&r2=316800&view=diff
==============================================================================
--- lldb/trunk/test/CMakeLists.txt (original)
+++ lldb/trunk/test/CMakeLists.txt Fri Oct 27 14:22:57 2017
@@ -109,6 +109,12 @@ add_python_test_target(check-lldb
"Testing LLDB (parallel execution, with a separate subprocess per test)"
)
+# If we're building with an in-tree clang, then list clang as a dependency
+# to run tests.
+if (TARGET clang)
+ add_dependencies(check-lldb clang)
+endif()
+
add_custom_target(lldb-test-depends DEPENDS ${LLDB_TEST_DEPENDS})
# This will add LLDB's test dependencies to the depenednecies for check-all and
# include them in the test-depends target.
More information about the lldb-commits
mailing list