[PATCH] D45409: [cmake] Include LLVMTestingSupport when doing stand-alone build
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 7 13:46:17 PDT 2018
mgorny created this revision.
mgorny added reviewers: simark, ilya-biryukov.
Herald added a subscriber: ioeric.
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.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45409
Files:
unittests/CMakeLists.txt
Index: unittests/CMakeLists.txt
===================================================================
--- unittests/CMakeLists.txt
+++ unittests/CMakeLists.txt
@@ -5,6 +5,15 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45409.141507.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180407/848c158d/attachment-0001.bin>
More information about the cfe-commits
mailing list