diff --git a/paddle/fluid/memory/allocation/CMakeLists.txt b/paddle/fluid/memory/allocation/CMakeLists.txt index 8eff7a3fc881b0abbe63cee5a4d09fdac71d8d3c..0a5a3b31542b5fd5dd71f7531e34233e6f735aba 100644 --- a/paddle/fluid/memory/allocation/CMakeLists.txt +++ b/paddle/fluid/memory/allocation/CMakeLists.txt @@ -47,6 +47,10 @@ if(NOT WIN32) endif() endif() +if(UNIX AND NOT APPLE) + list(APPEND ALLOCATOR_DEPS rt) +endif() + if(WITH_ASCEND_CL) list(APPEND ALLOCATOR_SRCS npu_allocator.cc npu_pinned_allocator.cc) list(APPEND ALLOCATOR_DEPS npu_info)