forked from PaddlePaddle/Paddle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·48 lines (42 loc) · 1.79 KB
/
CMakeLists.txt
File metadata and controls
executable file
·48 lines (42 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
add_subdirectory(collective)
add_subdirectory(store)
if(WITH_PYTHON)
py_proto_compile(ps_py_proto SRCS the_one_ps.proto)
add_custom_target(ps_py_proto_init ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto)
add_dependencies(ps_py_proto ps_py_proto_init)
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/)
else(NOT WIN32)
string(REPLACE "/" "\\" fleet_proto_dstpath "${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto/")
add_custom_command(TARGET ps_py_proto POST_BUILD
COMMAND copy /Y the_one_ps_pb2.py ${fleet_proto_dstpath}
COMMENT "Copy generated python the_one_ps_pb2 into directory ${fleet_proto_dstpath}.")
endif(NOT WIN32)
endif()
if(NOT WITH_PSCORE)
add_subdirectory(fleet_executor)
return()
endif()
proto_library(ps_framework_proto SRCS the_one_ps.proto)
add_custom_target(
ps.pb.h
COMMAND cp the_one_ps.pb.h ps.pb.h
DEPENDS ps_framework_proto
)
add_custom_target(
ps.pb.cc
COMMAND cp the_one_ps.pb.cc ps.pb.cc
DEPENDS ps_framework_proto
)
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=type-limits -Wno-error=unknown-pragmas -Wno-error=parentheses -Wno-error=unused-result")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(DISTRIBUTE_COMPILE_FLAGS
"${DISTRIBUTE_COMPILE_FLAGS} -faligned-new")
endif()
add_subdirectory(common)
add_subdirectory(ps)
add_subdirectory(test)
add_subdirectory(index_dataset)
add_subdirectory(fleet_executor)