From 961151f17a2928943fbf82c57c85cfabd36b8ee7 Mon Sep 17 00:00:00 2001 From: Liu Yiqun Date: Mon, 19 Mar 2018 11:36:12 +0000 Subject: [PATCH] Disable the link flags on Mac. --- paddle/fluid/inference/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/CMakeLists.txt b/paddle/fluid/inference/CMakeLists.txt index f4609a3b5b1..aff427310f1 100644 --- a/paddle/fluid/inference/CMakeLists.txt +++ b/paddle/fluid/inference/CMakeLists.txt @@ -13,8 +13,11 @@ cc_library(paddle_fluid_shared SHARED SRCS io.cc DEPS ARCHIVE_START ${GLOB_OP_LIB} ${FLUID_CORE_MODULES} ARCHIVE_END) set_target_properties(paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid) -set(LINK_FLAGS "-Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.map") -set_target_properties(paddle_fluid_shared PROPERTIES LINK_FLAGS "${LINK_FLAGS}") +if(NOT APPLE) + # TODO(liuyiqun): Temporarily disable the link flag because it is not support on Mac. + set(LINK_FLAGS "-Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.map") + set_target_properties(paddle_fluid_shared PROPERTIES LINK_FLAGS "${LINK_FLAGS}") +endif() if(WITH_TESTING) add_subdirectory(tests/book) -- GitLab