CMakeLists.txt 1005 字节
Newer Older
1
set(PADDLE_RPC_SRCS python_rpc_handler.cc rpc_agent.cc)
X
Xinger 已提交
2
set(DISTRIBUTE_COMPILE_FLAGS
3
    "-Wno-error=unused-value -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=parentheses -Wno-error=unused-result"
X
Xinger 已提交
4 5 6 7 8
)

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
  set(DISTRIBUTE_COMPILE_FLAGS "${DISTRIBUTE_COMPILE_FLAGS} -faligned-new")
endif()
9 10 11 12 13 14

set_source_files_properties(
  python_rpc_handler.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(rpc_agent.cc PROPERTIES COMPILE_FLAGS
                                                    ${DISTRIBUTE_COMPILE_FLAGS})

X
Xinger 已提交
15 16 17 18 19 20 21 22
set(PADDLE_RPC_DEPS
    brpc
    ssl
    crypto
    protobuf
    zlib
    leveldb
    snappy
23
    phi
X
Xinger 已提交
24 25
    glog
    pybind)
26 27 28 29
proto_library(paddle_rpc_proto SRCS rpc.proto)
cc_library(
  paddle_rpc
  SRCS ${PADDLE_RPC_SRCS}
R
risemeup1 已提交
30
  DEPS ${PADDLE_RPC_DEPS} paddle_rpc_proto pybind)
X
Xinger 已提交
31
add_dependencies(paddle_rpc brpc)