[clang-tools-extra] 4645ef1 - [clangd] Add CMake dependencies for Protobuf-generated files

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 29 08:01:23 PDT 2020


Author: Kirill Bobyrev
Date: 2020-04-29T17:01:03+02:00
New Revision: 4645ef17ff1aa30e1890b7c8230b590ef830081b

URL: https://github.com/llvm/llvm-project/commit/4645ef17ff1aa30e1890b7c8230b590ef830081b
DIFF: https://github.com/llvm/llvm-project/commit/4645ef17ff1aa30e1890b7c8230b590ef830081b.diff

LOG: [clangd] Add CMake dependencies for Protobuf-generated files

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

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/index/remote/CMakeLists.txt b/clang-tools-extra/clangd/index/remote/CMakeLists.txt
index a358aae0ef6b..81287b58afa5 100644
--- a/clang-tools-extra/clangd/index/remote/CMakeLists.txt
+++ b/clang-tools-extra/clangd/index/remote/CMakeLists.txt
@@ -19,6 +19,9 @@ if (CLANGD_ENABLE_REMOTE)
     grpc++
     clangDaemon
     clangdSupport
+
+    DEPENDS
+    RemoteIndexProtos
     )
 
   add_subdirectory(marshalling)

diff  --git a/clang-tools-extra/clangd/index/remote/marshalling/CMakeLists.txt b/clang-tools-extra/clangd/index/remote/marshalling/CMakeLists.txt
index 0e5e5133eed5..75e57edd45d9 100644
--- a/clang-tools-extra/clangd/index/remote/marshalling/CMakeLists.txt
+++ b/clang-tools-extra/clangd/index/remote/marshalling/CMakeLists.txt
@@ -7,4 +7,7 @@ add_clang_library(clangdRemoteMarshalling
   protobuf
   clangDaemon
   clangdSupport
+
+  DEPENDS
+  RemoteIndexProtos
   )

diff  --git a/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt b/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
index 019b77eb98ba..b87541f98ef4 100644
--- a/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
+++ b/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
@@ -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


        


More information about the cfe-commits mailing list