[PATCH] D33395: [clangd] Split clangd into library+executable (mainly for unit tests).
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 22 01:44:48 PDT 2017
ilya-biryukov created this revision.
Herald added a subscriber: mgorny.
This commit itself doesn't add any unit tests, but one that does will
follow shortly.
https://reviews.llvm.org/D33395
Files:
clangd/CMakeLists.txt
clangd/ClangdMain.cpp
clangd/tool/CMakeLists.txt
clangd/tool/ClangdMain.cpp
Index: clangd/tool/ClangdMain.cpp
===================================================================
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#include "ClangdLSPServer.h"
-#include "JSONRPCDispatcher.h"
+#include "../ClangdLSPServer.h"
+#include "../JSONRPCDispatcher.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Program.h"
Index: clangd/tool/CMakeLists.txt
===================================================================
--- clangd/tool/CMakeLists.txt
+++ clangd/tool/CMakeLists.txt
@@ -1,20 +1,12 @@
add_clang_executable(clangd
- ClangdLSPServer.cpp
ClangdMain.cpp
- ClangdServer.cpp
- ClangdUnit.cpp
- ClangdUnitStore.cpp
- DraftStore.cpp
- GlobalCompilationDatabase.cpp
- JSONRPCDispatcher.cpp
- Protocol.cpp
- ProtocolHandlers.cpp
)
install(TARGETS clangd RUNTIME DESTINATION bin)
target_link_libraries(clangd
clangBasic
+ clangDaemon
clangFormat
clangFrontend
clangSema
Index: clangd/CMakeLists.txt
===================================================================
--- clangd/CMakeLists.txt
+++ clangd/CMakeLists.txt
@@ -1,6 +1,5 @@
-add_clang_executable(clangd
+add_clang_library(clangDaemon
ClangdLSPServer.cpp
- ClangdMain.cpp
ClangdServer.cpp
ClangdUnit.cpp
ClangdUnitStore.cpp
@@ -11,14 +10,14 @@
ProtocolHandlers.cpp
)
-install(TARGETS clangd RUNTIME DESTINATION bin)
-
-target_link_libraries(clangd
+target_link_libraries(clangDaemon
clangBasic
clangFormat
clangFrontend
clangSema
clangTooling
clangToolingCore
LLVMSupport
)
+
+add_subdirectory(tool)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33395.99723.patch
Type: text/x-patch
Size: 1736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170522/cd7ad982/attachment.bin>
More information about the cfe-commits
mailing list