From 57b30c2be3b401c95e080d7bb98892a5af599fc6 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Tue, 10 Jul 2018 21:43:51 +0800 Subject: [PATCH] fix compiler error when using shared library, disable testing static library --- paddle/contrib/inference/demo_ci/CMakeLists.txt | 5 +++-- paddle/contrib/inference/demo_ci/run.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/paddle/contrib/inference/demo_ci/CMakeLists.txt b/paddle/contrib/inference/demo_ci/CMakeLists.txt index 09aace2d8a4..789bff7f23c 100644 --- a/paddle/contrib/inference/demo_ci/CMakeLists.txt +++ b/paddle/contrib/inference/demo_ci/CMakeLists.txt @@ -59,9 +59,10 @@ if(WITH_STATIC_LIB) "-Wl,--no-whole-archive" ${PADDLE_LIB}/contrib/inference/libpaddle_inference_api.a) else() + # Note: libpaddle_inference_api.so must put before libpaddle_fluid.so set(DEPS - ${PADDLE_LIB}/paddle/fluid/inference/libpaddle_fluid.so - ${PADDLE_LIB}/contrib/inference/libpaddle_inference_api.so) + ${PADDLE_LIB}/contrib/inference/libpaddle_inference_api.so + ${PADDLE_LIB}/paddle/fluid/inference/libpaddle_fluid.so) endif() set(EXTERNAL_LIB "-lrt -ldl -lpthread") diff --git a/paddle/contrib/inference/demo_ci/run.sh b/paddle/contrib/inference/demo_ci/run.sh index e33e939463b..e3a7269af79 100755 --- a/paddle/contrib/inference/demo_ci/run.sh +++ b/paddle/contrib/inference/demo_ci/run.sh @@ -11,7 +11,7 @@ fi mkdir -p build cd build -for WITH_STATIC_LIB in true false; do +for WITH_STATIC_LIB in false; do rm -rf * cmake .. -DPADDLE_LIB=${PADDLE_ROOT}/build/fluid_install_dir/ \ -DWITH_MKL=$WITH_MKL \ -- GitLab