From 3cf23bece3f9917eedf7b5d5548aedbfd301854d Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Fri, 12 Jan 2018 18:18:21 +0800 Subject: [PATCH] create paddle_fluid_shared.so library --- paddle/inference/CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/paddle/inference/CMakeLists.txt b/paddle/inference/CMakeLists.txt index 8437b2b2194..b017283ec3b 100644 --- a/paddle/inference/CMakeLists.txt +++ b/paddle/inference/CMakeLists.txt @@ -1,12 +1,20 @@ -set(FLUID_CORE_MODULES - backward proto_desc paddle_memory executor prune init ${GLOB_OP_LIB}) +set(FLUID_CORE_MODULES proto_desc paddle_memory executor prune init) cc_library(paddle_fluid_api SRCS inference.cc - DEPS ${FLUID_CORE_MODULES}) + DEPS ${FLUID_CORE_MODULES} ${GLOB_OP_LIB}) -# Merge all modules into a simgle static library -cc_library(paddle_fluid DEPS paddle_fluid_api ${FLUID_CORE_MODULES}) +# Merge all modules into a single static library +cc_library(paddle_fluid DEPS paddle_fluid_api ${FLUID_CORE_MODULES} ${GLOB_OP_LIB}) + +# Create shared library +add_library(paddle_fluid_shared SHARED inference.cc) + +target_circle_link_libraries(paddle_fluid_shared + ARCHIVE_START + ${GLOB_OP_LIB} + ARCHIVE_END + ${FLUID_CORE_MODULES}) # ptools # just for testing, we may need to change the storing format for inference_model -- GitLab