diff --git a/paddle/fluid/distributed/CMakeLists.txt b/paddle/fluid/distributed/CMakeLists.txt index 0091c14bfd17794181c6e81933175804f8b7d9b4..107a19cb7decc0417de5a068aa2e5647216656a3 100644 --- a/paddle/fluid/distributed/CMakeLists.txt +++ b/paddle/fluid/distributed/CMakeLists.txt @@ -4,6 +4,7 @@ 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/)