From 8e3638f332294c9a52dbf2b63a3019f6c803aa62 Mon Sep 17 00:00:00 2001 From: Tao Luo Date: Mon, 29 Oct 2018 10:57:30 +0800 Subject: [PATCH] fix cmake warning when ON_INFER=false test=develop --- CMakeLists.txt | 2 +- cmake/inference_lib.cmake | 3 --- paddle/fluid/inference/api/demo_ci/run.sh | 9 +++------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3379a663db..67e1c6d7c1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,6 +305,6 @@ if(WITH_DOC) endif() if (ON_INFER) - message(WARNING "On inference mode, will take place some specific optimization.") + message(STATUS "On inference mode, will take place some specific optimization.") add_definitions(-DPADDLE_ON_INFERENCE) endif() diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 1047b6f998a..efdb093a7b2 100644 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -14,9 +14,6 @@ # make package for paddle fluid shared and static library function(copy TARGET) - if (NOT ON_INFER) - message(WARNING "Turn on the ON_INFER flag when building inference_lib only.") - endif() set(options "") set(oneValueArgs "") set(multiValueArgs SRCS DSTS DEPS) diff --git a/paddle/fluid/inference/api/demo_ci/run.sh b/paddle/fluid/inference/api/demo_ci/run.sh index 340e84d9312..1ac655bdbbf 100755 --- a/paddle/fluid/inference/api/demo_ci/run.sh +++ b/paddle/fluid/inference/api/demo_ci/run.sh @@ -60,8 +60,7 @@ for WITH_STATIC_LIB in ON OFF; do -DWITH_MKL=$TURN_ON_MKL \ -DDEMO_NAME=simple_on_word2vec \ -DWITH_GPU=$TEST_GPU_CPU \ - -DWITH_STATIC_LIB=$WITH_STATIC_LIB \ - -DON_INFER=ON + -DWITH_STATIC_LIB=$WITH_STATIC_LIB make -j word2vec_model=${PADDLE_ROOT}'/build/python/paddle/fluid/tests/book/word2vec.inference.model' if [ -d $word2vec_model ]; then @@ -81,8 +80,7 @@ for WITH_STATIC_LIB in ON OFF; do -DWITH_MKL=$TURN_ON_MKL \ -DDEMO_NAME=vis_demo \ -DWITH_GPU=$TEST_GPU_CPU \ - -DWITH_STATIC_LIB=$WITH_STATIC_LIB \ - -DON_INFER=ON + -DWITH_STATIC_LIB=$WITH_STATIC_LIB make -j for use_gpu in $use_gpu_list; do for vis_demo_name in $vis_demo_list; do @@ -108,8 +106,7 @@ for WITH_STATIC_LIB in ON OFF; do -DWITH_STATIC_LIB=$WITH_STATIC_LIB \ -DUSE_TENSORRT=$USE_TENSORRT \ -DTENSORRT_INCLUDE_DIR=$TENSORRT_INCLUDE_DIR \ - -DTENSORRT_LIB_DIR=$TENSORRT_LIB_DIR \ - -DON_INFER=ON + -DTENSORRT_LIB_DIR=$TENSORRT_LIB_DIR make -j ./trt_mobilenet_demo \ --modeldir=$DATA_DIR/mobilenet/model \ -- GitLab