From 621663174c44957851296c5f548165bbe9f429ae Mon Sep 17 00:00:00 2001 From: Tao Luo Date: Mon, 1 Jan 2018 18:49:42 +0800 Subject: [PATCH] fix library not found for -lrt on MAC (#7119) --- paddle/pybind/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/pybind/CMakeLists.txt b/paddle/pybind/CMakeLists.txt index ced75cbfd89..7b374307071 100644 --- a/paddle/pybind/CMakeLists.txt +++ b/paddle/pybind/CMakeLists.txt @@ -3,7 +3,9 @@ if(WITH_PYTHON) SRCS pybind.cc exception.cc protobuf.cc const_value.cc DEPS pybind python backward proto_desc paddle_memory executor prune init ${GLOB_OP_LIB}) - target_link_libraries(paddle_pybind rt) + if(NOT APPLE AND NOT ANDROID) + target_link_libraries(paddle_pybind rt) + endif(NOT APPLE AND NOT ANDROID) endif(WITH_PYTHON) if(WITH_DOC) -- GitLab