diff --git a/paddle/phi/api/profiler/CMakeLists.txt b/paddle/phi/api/profiler/CMakeLists.txt index 3efe78c634aa4df2b5ce4f554cb7a3f12333a059..82d8819f914fdd855cc4c36d9c941931d2bfa2b8 100644 --- a/paddle/phi/api/profiler/CMakeLists.txt +++ b/paddle/phi/api/profiler/CMakeLists.txt @@ -3,11 +3,7 @@ proto_library(phi_profiler_proto SRCS profiler.proto) if(WITH_PYTHON AND EXISTS ${PADDLE_BINARY_DIR}) set(FLUID_PATH ${PADDLE_BINARY_DIR}/python/paddle/fluid) py_proto_compile(profiler_py_proto SRCS profiler.proto) - - add_custom_target(profiler_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E - touch __init__.py) - add_dependencies(profiler_py_proto profiler_py_proto_init) - + file(TOUCH __init__.py) if(NOT WIN32) add_custom_command( TARGET profiler_py_proto