[clangd] Add back dependency on proto generated targets
authorKirill Bobyrev <kbobyrev@google.com>
Mon, 26 Oct 2020 19:37:43 +0000 (20:37 +0100)
committerKirill Bobyrev <kbobyrev@google.com>
Mon, 26 Oct 2020 19:39:10 +0000 (20:39 +0100)
Previous attempts:

15f6bad6d74a993e366c8fc93a9c91f213ac6bc3
58d0ef2d0466a893ab400f6a9829057b9d851038

The combination results in both link- and build-time dependency which is
the desired behavior.

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

index 5a9f49a..971af20 100644 (file)
@@ -3,9 +3,10 @@ if (CLANGD_ENABLE_REMOTE)
   generate_protos(RemoteIndexProto "Index.proto")
   target_link_libraries(RemoteIndexServiceProto
 
-    PRIVATE
+    PUBLIC
     RemoteIndexProto
     )
+  add_dependencies(RemoteIndexServiceProto RemoteIndexProto)
   include_directories(${CMAKE_CURRENT_BINARY_DIR})
   include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../)