[clang-tools-extra] r329594 - [cmake] Include LLVMTestingSupport when doing stand-alone build
Michal Gorny via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 9 10:08:14 PDT 2018
Author: mgorny
Date: Mon Apr 9 10:08:14 2018
New Revision: 329594
URL: http://llvm.org/viewvc/llvm-project?rev=329594&view=rev
Log:
[cmake] Include LLVMTestingSupport when doing stand-alone build
Explicitly include and build lib/Testing/Support from LLVM sources when
doing a stand-alone build. This is necessary since clangd tests started
to depend on LLVMTestingSupport library which is neither installed
by LLVM, nor built by clang itself.
Since completely separate build of clang-tools-extra is not supported,
this relies on variables set by clang CMakeLists.
Differential Revision: https://reviews.llvm.org/D45409
Modified:
clang-tools-extra/trunk/unittests/CMakeLists.txt
Modified: clang-tools-extra/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/CMakeLists.txt?rev=329594&r1=329593&r2=329594&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/unittests/CMakeLists.txt Mon Apr 9 10:08:14 2018
@@ -5,6 +5,15 @@ function(add_extra_unittest test_dirname
add_unittest(ExtraToolsUnitTests ${test_dirname} ${ARGN})
endfunction()
+if(CLANG_BUILT_STANDALONE)
+ # LLVMTestingSupport library is needed for clangd tests.
+ 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()
+
add_subdirectory(change-namespace)
add_subdirectory(clang-apply-replacements)
add_subdirectory(clang-move)
More information about the cfe-commits
mailing list