49 lines · plain
1if (CLANGD_ENABLE_REMOTE)2 generate_clang_protos_library(clangdRemoteIndexProto "Index.proto")3 generate_clang_protos_library(clangdMonitoringServiceProto "MonitoringService.proto"4 GRPC)5 generate_clang_protos_library(clangdRemoteIndexServiceProto "Service.proto"6 DEPENDS "Index.proto"7 GRPC)8 # FIXME: Move this into generate_protos. Currently we only mention proto9 # filename as a dependency, but linking requires target name.10 target_link_libraries(clangdRemoteIndexServiceProto11 PRIVATE12 clangdRemoteIndexProto13 clangdMonitoringServiceProto14 )15 include_directories(${CMAKE_CURRENT_BINARY_DIR})16 17 # FIXME(kirillbobyrev): target_compile_definitions is not working with18 # add_clang_library for some reason. Is there any way to make this19 # target-local?20 add_definitions(-DGOOGLE_PROTOBUF_NO_RTTI=1)21 22 add_clang_library(clangdRemoteIndex STATIC23 Client.cpp24 25 LINK_LIBS26 clangdRemoteIndexProto27 clangdRemoteIndexServiceProto28 clangdRemoteMarshalling29 clangDaemon30 clangdSupport31 32 DEPENDS33 clangdRemoteIndexProto34 clangdRemoteIndexServiceProto35 )36 37 clang_target_link_libraries(clangdRemoteIndex38 PRIVATE39 clangBasic40 )41 42 add_subdirectory(marshalling)43 add_subdirectory(server)44 add_subdirectory(monitor)45else()46 # Provides a no-op implementation of clangdRemoteIndex.47 add_subdirectory(unimplemented)48endif()49