[clangd] Add CMake dependencies for Protobuf-generated files
authorKirill Bobyrev <kbobyrev@google.com>
Wed, 29 Apr 2020 14:59:32 +0000 (16:59 +0200)
committerKirill Bobyrev <kbobyrev@google.com>
Wed, 29 Apr 2020 15:01:03 +0000 (17:01 +0200)
Summary:
Dependencies ensure that Protobufs are generated before all libraries
depending on the headers are **built**, not linked.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79085

clang-tools-extra/clangd/index/remote/CMakeLists.txt
clang-tools-extra/clangd/index/remote/marshalling/CMakeLists.txt
clang-tools-extra/clangd/index/remote/server/CMakeLists.txt

index a358aae..81287b5 100644 (file)
@@ -19,6 +19,9 @@ if (CLANGD_ENABLE_REMOTE)
     grpc++
     clangDaemon
     clangdSupport
+
+    DEPENDS
+    RemoteIndexProtos
     )
 
   add_subdirectory(marshalling)
index 0e5e513..75e57ed 100644 (file)
@@ -7,4 +7,7 @@ add_clang_library(clangdRemoteMarshalling
   protobuf
   clangDaemon
   clangdSupport
+
+  DEPENDS
+  RemoteIndexProtos
   )
index 019b77e..b87541f 100644 (file)
@@ -4,6 +4,9 @@ set(LLVM_LINK_COMPONENTS
   )
 add_clang_executable(clangd-index-server
   Server.cpp
+
+  DEPENDS
+  RemoteIndexProtos
   )
 target_link_libraries(clangd-index-server
   PRIVATE