Skip to content

Commit 8e3638f

Browse files
committed
fix cmake warning when ON_INFER=false
test=develop
1 parent 043f450 commit 8e3638f

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,6 @@ if(WITH_DOC)
305305
endif()
306306

307307
if (ON_INFER)
308-
message(WARNING "On inference mode, will take place some specific optimization.")
308+
message(STATUS "On inference mode, will take place some specific optimization.")
309309
add_definitions(-DPADDLE_ON_INFERENCE)
310310
endif()

cmake/inference_lib.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
# make package for paddle fluid shared and static library
1616
function(copy TARGET)
17-
if (NOT ON_INFER)
18-
message(WARNING "Turn on the ON_INFER flag when building inference_lib only.")
19-
endif()
2017
set(options "")
2118
set(oneValueArgs "")
2219
set(multiValueArgs SRCS DSTS DEPS)

paddle/fluid/inference/api/demo_ci/run.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ for WITH_STATIC_LIB in ON OFF; do
6060
-DWITH_MKL=$TURN_ON_MKL \
6161
-DDEMO_NAME=simple_on_word2vec \
6262
-DWITH_GPU=$TEST_GPU_CPU \
63-
-DWITH_STATIC_LIB=$WITH_STATIC_LIB \
64-
-DON_INFER=ON
63+
-DWITH_STATIC_LIB=$WITH_STATIC_LIB
6564
make -j
6665
word2vec_model=${PADDLE_ROOT}'/build/python/paddle/fluid/tests/book/word2vec.inference.model'
6766
if [ -d $word2vec_model ]; then
@@ -81,8 +80,7 @@ for WITH_STATIC_LIB in ON OFF; do
8180
-DWITH_MKL=$TURN_ON_MKL \
8281
-DDEMO_NAME=vis_demo \
8382
-DWITH_GPU=$TEST_GPU_CPU \
84-
-DWITH_STATIC_LIB=$WITH_STATIC_LIB \
85-
-DON_INFER=ON
83+
-DWITH_STATIC_LIB=$WITH_STATIC_LIB
8684
make -j
8785
for use_gpu in $use_gpu_list; do
8886
for vis_demo_name in $vis_demo_list; do
@@ -108,8 +106,7 @@ for WITH_STATIC_LIB in ON OFF; do
108106
-DWITH_STATIC_LIB=$WITH_STATIC_LIB \
109107
-DUSE_TENSORRT=$USE_TENSORRT \
110108
-DTENSORRT_INCLUDE_DIR=$TENSORRT_INCLUDE_DIR \
111-
-DTENSORRT_LIB_DIR=$TENSORRT_LIB_DIR \
112-
-DON_INFER=ON
109+
-DTENSORRT_LIB_DIR=$TENSORRT_LIB_DIR
113110
make -j
114111
./trt_mobilenet_demo \
115112
--modeldir=$DATA_DIR/mobilenet/model \

0 commit comments

Comments
 (0)