Skip to content

Commit ba99bc2

Browse files
committed
update
1 parent f122494 commit ba99bc2

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

paddle/fluid/inference/analysis/CMakeLists.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ cc_test(test_dot SRCS dot_tester.cc DEPS analysis)
1313
set(PYTHON_TESTS_DIR ${PADDLE_BINARY_DIR}/python/paddle/fluid/tests)
1414

1515
function (inference_analysis_test TARGET)
16-
set(options "")
17-
set(oneValueArgs "")
18-
set(multiValueArgs SRCS)
19-
cmake_parse_arguments(analysis_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
16+
if(WITH_TESTING)
17+
set(options "")
18+
set(oneValueArgs "")
19+
set(multiValueArgs SRCS)
20+
cmake_parse_arguments(analysis_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
2021

21-
cc_test(${TARGET}
22-
SRCS "${analysis_test_SRCS}"
23-
DEPS analysis
24-
ARGS --inference_model_dir=${PYTHON_TESTS_DIR}/book/word2vec.inference.model --fraction_of_gpu_memory_to_use=0.5)
25-
set_tests_properties(${TARGET} PROPERTIES DEPENDS test_word2vec)
22+
cc_test(${TARGET}
23+
SRCS "${analysis_test_SRCS}"
24+
DEPS analysis
25+
ARGS --inference_model_dir=${PYTHON_TESTS_DIR}/book/word2vec.inference.model --fraction_of_gpu_memory_to_use=0.5)
26+
set_tests_properties(${TARGET} PROPERTIES DEPENDS test_word2vec)
27+
endif(WITH_TESTING)
2628
endfunction(inference_analysis_test)
2729

2830
inference_analysis_test(test_data_flow_graph SRCS data_flow_graph_tester.cc)

0 commit comments

Comments
 (0)