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)


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)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to