File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,10 @@ endif()
28
28
if (WITH_TESTING )
29
29
# both tests/book and analysis depends the models that generated by python/paddle/fluid/tests/book
30
30
add_subdirectory (tests/book )
31
- add_subdirectory (analysis )
32
31
endif ()
33
32
33
+ add_subdirectory (analysis )
34
+
34
35
if (TENSORRT_FOUND )
35
36
add_subdirectory (tensorrt )
36
37
endif ()
Original file line number Diff line number Diff line change @@ -13,16 +13,18 @@ cc_test(test_dot SRCS dot_tester.cc DEPS analysis)
13
13
set (PYTHON_TESTS_DIR ${PADDLE_BINARY_DIR} /python/paddle/fluid/tests )
14
14
15
15
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} )
20
21
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 )
26
28
endfunction (inference_analysis_test )
27
29
28
30
inference_analysis_test (test_data_flow_graph SRCS data_flow_graph_tester.cc )
You can’t perform that action at this time.
0 commit comments