CMakeLists.txt 1.5 KB
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# 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})

add_style_check_target(paddle_network ${NETWORK_SOURCES})
add_style_check_target(paddle_network ${NETWORK_HEADERS})

Y
Yu Yang 已提交
20
add_dependencies(paddle_network paddle_proto)
Z
zhangjinchao01 已提交
21 22 23 24 25 26

################### paddle_pserver ######################
set(PSERVER_SOURCES
    BaseClient.cpp
    ParameterClient2.cpp
    ParameterServer2.cpp
27
    SparseParameterDistribution.cpp
28
    ParameterServerController.cpp)
Z
zhangjinchao01 已提交
29 30 31 32 33

set(PSERVER_HEADERS
    BaseClient.h
    ParameterClient2.h
    ParameterServer2.h
34
    SparseParameterDistribution.h
35
    ParameterServerController.h)
Z
zhangjinchao01 已提交
36 37 38 39 40 41 42

add_library(paddle_pserver STATIC
    ${PSERVER_SOURCES})

add_style_check_target(paddle_pserver ${PSERVER_SOURCES})
add_style_check_target(paddle_pserver ${PSERVER_HEADERS})

Y
Yu Yang 已提交
43
add_dependencies(paddle_pserver paddle_proto ${external_project_dependencies})
Z
zhangjinchao01 已提交
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

set(PSERVER_MAIN_SOURCES
    ParameterServer2Main.cpp)

add_executable(paddle_pserver_main
    ${PSERVER_MAIN_SOURCES})
link_paddle_exe(paddle_pserver_main)
if(WITH_TESTING)
  add_subdirectory(test)
endif()
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)