CMakeLists.txt 4.6 KB
Newer Older
T
tangwei12 已提交
1 2 3
set(BRPC_SRCS ps_client.cc server.cc)
set_source_files_properties(${BRPC_SRCS})

Z
zhaocaibei123 已提交
4
if(WITH_HETERPS)
5

6 7 8 9 10 11 12 13 14 15 16 17 18 19
  set(BRPC_DEPS
      brpc
      ssl
      crypto
      protobuf
      gflags
      glog
      zlib
      leveldb
      snappy
      gflags
      glog
      device_context
      rocksdb)
20

Z
zhaocaibei123 已提交
21
else()
22

23 24 25 26 27 28 29 30 31 32 33 34 35
  set(BRPC_DEPS
      brpc
      ssl
      crypto
      protobuf
      gflags
      glog
      zlib
      leveldb
      snappy
      gflags
      glog
      device_context)
36

Z
zhaocaibei123 已提交
37
endif()
T
tangwei12 已提交
38

39 40 41 42 43 44 45 46
brpc_library(
  sendrecv_rpc
  SRCS
  ${BRPC_SRCS}
  PROTO
  sendrecv.proto
  DEPS
  ${BRPC_DEPS})
T
tangwei12 已提交
47

48
#set_property(GLOBAL PROPERTY RPC_DEPS sendrecv_rpc ${BRPC_DEPS} string_helper)
T
tangwei12 已提交
49 50 51

get_property(RPC_DEPS GLOBAL PROPERTY RPC_DEPS)

52 53 54 55
proto_library(simple_brpc_proto SRCS simple_brpc.proto)
set_source_files_properties(
  simple_rpc/rpc_server.cc simple_rpc/baidu_rpc_server.cc
  PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
56 57 58 59 60 61 62 63 64 65 66
set_source_files_properties(
  communicator/communicator.cc PROPERTIES COMPILE_FLAGS
                                          ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  ps_service/service.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  brpc_ps_server.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  brpc_ps_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  ps_local_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
67 68
set_source_files_properties(
  ps_graph_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86

set_source_files_properties(
  brpc_utils.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  heter_server.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  heter_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})

set_source_files_properties(client.cc PROPERTIES COMPILE_FLAGS
                                                 ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(ps_client.cc PROPERTIES COMPILE_FLAGS
                                                    ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(server.cc PROPERTIES COMPILE_FLAGS
                                                 ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  graph_brpc_server.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  graph_brpc_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
87 88 89 90

set_source_files_properties(
  coordinator_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})

Z
zhaocaibei123 已提交
91 92 93
set_source_files_properties(
  ps_service/graph_py_service.cc PROPERTIES COMPILE_FLAGS
                                            ${DISTRIBUTE_COMPILE_FLAGS})
94

95 96 97 98 99
cc_library(
  brpc_utils
  SRCS brpc_utils.cc
  DEPS tensor device_context ${COMMON_DEPS} ${RPC_DEPS})

100 101 102 103 104
cc_library(
  simple_rpc
  SRCS simple_rpc/rpc_server.cc simple_rpc/baidu_rpc_server.cc
  DEPS simple_brpc_proto ${RPC_DEPS})

105 106
cc_library(
  ps_service
Z
zhaocaibei123 已提交
107 108 109 110 111 112
  SRCS graph_brpc_server.cc
       brpc_ps_server.cc
       server.cc
       graph_brpc_client.cc
       brpc_ps_client.cc
       ps_local_client.cc
113
       ps_graph_client.cc
Z
zhaocaibei123 已提交
114 115 116 117 118 119 120 121 122
       coordinator_client.cc
       ps_client.cc
       communicator/communicator.cc
       ps_service/service.cc
       ps_service/graph_py_service.cc
  DEPS eigen3
       table
       brpc_utils
       simple_threadpool
123
       simple_rpc
Z
zhaocaibei123 已提交
124 125 126
       scope
       math_function
       selected_rows_functor
127
       ps_gpu_wrapper
Z
zhaocaibei123 已提交
128
       ${RPC_DEPS})
129

130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
#cc_library(
#  downpour_server
#  SRCS graph_brpc_server.cc brpc_ps_server.cc
#  DEPS eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})

#cc_library(
#  downpour_client
#  SRCS graph_brpc_client.cc brpc_ps_client.cc ps_local_client.cc
#       ps_graph_client.cc coordinator_client.cc
#  DEPS eigen3 table brpc_utils simple_threadpool ps_gpu_wrapper simple_rpc ${RPC_DEPS})

#cc_library(
#  client
#  SRCS ps_client.cc
#  DEPS downpour_client ${RPC_DEPS})
#cc_library(
#  server
#  SRCS server.cc
#  DEPS downpour_server ${RPC_DEPS})

#cc_library(
#  communicator
#  SRCS communicator/communicator.cc
#  DEPS scope client table math_function selected_rows_functor ${RPC_DEPS})
#cc_library(
#  ps_service
#  SRCS ps_service/service.cc
#  DEPS communicator client server ${RPC_DEPS})

159 160 161 162 163 164 165 166
cc_library(
  heter_client
  SRCS heter_client.cc
  DEPS brpc_utils ${COMMON_DEPS} ${RPC_DEPS})
cc_library(
  heter_server
  SRCS heter_server.cc
  DEPS heter_client brpc_utils ${COMMON_DEPS} ${RPC_DEPS})
167 168 169 170 171

#cc_library(
#  graph_py_service
#  SRCS ps_service/graph_py_service.cc
#  DEPS ps_service)