CMakeLists.txt 1.8 KB
Newer Older
1
add_subdirectory(collective)
2
add_subdirectory(store)
W
wangguanqun 已提交
3 4
if(WITH_PYTHON)
  py_proto_compile(ps_py_proto SRCS the_one_ps.proto)
5 6 7 8
  add_custom_target(
    ps_py_proto_init ALL
    COMMAND ${CMAKE_COMMAND} -E make_directory
            ${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto)
9
  add_dependencies(ps_py_proto ps_py_proto_init)
10 11 12 13 14 15
  if(NOT WIN32)
    add_custom_command(
      TARGET ps_py_proto
      POST_BUILD
      COMMAND mv the_one_ps_pb2.py
              ${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto/)
W
wangguanqun 已提交
16
  else(NOT WIN32)
17 18 19 20 21 22
    string(
      REPLACE "/" "\\" fleet_proto_dstpath
              "${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto/")
    add_custom_command(
      TARGET ps_py_proto
      POST_BUILD
W
wangguanqun 已提交
23
      COMMAND copy /Y the_one_ps_pb2.py ${fleet_proto_dstpath}
24 25 26
      COMMENT
        "Copy generated python the_one_ps_pb2 into directory ${fleet_proto_dstpath}."
    )
W
wangguanqun 已提交
27 28 29
  endif(NOT WIN32)
endif()

T
tangwei12 已提交
30
if(NOT WITH_PSCORE)
31 32
  add_subdirectory(fleet_executor)
  return()
T
tangwei12 已提交
33 34
endif()

W
wangguanqun 已提交
35
proto_library(ps_framework_proto SRCS the_one_ps.proto)
36 37 38 39 40
add_custom_command(
  TARGET ps_framework_proto
  POST_BUILD
  COMMAND mv the_one_ps.pb.h ps.pb.h
  COMMAND mv the_one_ps.pb.cc ps.pb.cc)
T
tangwei12 已提交
41

42 43 44
set(DISTRIBUTE_COMPILE_FLAGS
    "-Wno-error=unused-value -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=unused-variable -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result"
)
T
tangwei12 已提交
45

46 47
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
  set(DISTRIBUTE_COMPILE_FLAGS "${DISTRIBUTE_COMPILE_FLAGS} -faligned-new")
T
tangwei12 已提交
48 49
endif()

50
add_subdirectory(common)
51
add_subdirectory(ps)
T
tangwei12 已提交
52
add_subdirectory(test)
1
123malin 已提交
53
add_subdirectory(index_dataset)
L
LiYuRio 已提交
54
add_subdirectory(fleet_executor)