[clang-tools-extra] d071bba - [clangd] Add back dependency on proto generated targets

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 26 12:39:24 PDT 2020


Author: Kirill Bobyrev
Date: 2020-10-26T20:39:10+01:00
New Revision: d071bba9a4477290d0b164a2d338fb22ad2d3c3d

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

LOG: [clangd] Add back dependency on proto generated targets

Previous attempts:

* 15f6bad6d74a993e366c8fc93a9c91f213ac6bc3
* 58d0ef2d0466a893ab400f6a9829057b9d851038

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/index/remote/CMakeLists.txt b/clang-tools-extra/clangd/index/remote/CMakeLists.txt
index 5a9f49a41d1f..971af205f45d 100644
--- a/clang-tools-extra/clangd/index/remote/CMakeLists.txt
+++ b/clang-tools-extra/clangd/index/remote/CMakeLists.txt
@@ -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}/../../)
 


        


More information about the cfe-commits mailing list