CMakeLists.txt 1.4 KB
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# parameter server package

######################### paddle_network ####################
set(NETWORK_SOURCES
    LightNetwork.cpp
    SocketChannel.cpp
    ProtoServer.cpp)

set(NETWORK_HEADERS
    LightNetwork.h
    SocketChannel.h
    ProtoServer.h)

add_library(paddle_network STATIC
    ${NETWORK_SOURCES})

Y
Yu Yang 已提交
17
add_dependencies(paddle_network paddle_proto ${external_project_dependencies})
Z
zhangjinchao01 已提交
18 19 20 21 22 23

################### paddle_pserver ######################
set(PSERVER_SOURCES
    BaseClient.cpp
    ParameterClient2.cpp
    ParameterServer2.cpp
24
    SparseParameterDistribution.cpp
25
    ParameterServerController.cpp)
Z
zhangjinchao01 已提交
26 27 28 29 30

set(PSERVER_HEADERS
    BaseClient.h
    ParameterClient2.h
    ParameterServer2.h
31
    SparseParameterDistribution.h
32
    ParameterServerController.h)
Z
zhangjinchao01 已提交
33 34 35 36

add_library(paddle_pserver STATIC
    ${PSERVER_SOURCES})

Y
Yu Yang 已提交
37
add_dependencies(paddle_pserver paddle_proto ${external_project_dependencies})
Z
zhangjinchao01 已提交
38 39 40 41 42 43 44

set(PSERVER_MAIN_SOURCES
    ParameterServer2Main.cpp)

if(WITH_TESTING)
  add_subdirectory(test)
endif()
45

46
if(NOT MOBILE_INFERENCE)
47 48 49 50 51 52 53 54 55 56
  add_executable(paddle_pserver_main ${PSERVER_MAIN_SOURCES})
  link_paddle_exe(paddle_pserver_main)

  install(TARGETS paddle_pserver_main
          RUNTIME DESTINATION opt/paddle/bin
          PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
          GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)

  set_target_properties(paddle_pserver_main PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()