File tree 2 files changed +8
-12
lines changed
2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.26.4 FATAL_ERROR)
2
2
project (torchserve_cpp VERSION 0.1)
3
3
4
+ enable_testing ()
5
+
4
6
set (CMAKE_CXX_STANDARD 17)
5
7
set (CMAKE_CXX_STANDARD_REQUIRED True )
6
8
set (CMAKE_CXX_EXTENSIONS OFF )
@@ -73,5 +75,3 @@ add_subdirectory(test)
73
75
FILE (COPY src/resources/logging.yaml DESTINATION "${CMAKE_INSTALL_PREFIX} /resources" )
74
76
75
77
install (SCRIPT "install.cmake" )
76
-
77
- enable_testing ()
Original file line number Diff line number Diff line change @@ -57,16 +57,12 @@ function build() {
57
57
58
58
make -j " $JOBS "
59
59
make install
60
- echo -e " ${COLOR_GREEN} torchserve_cpp build is complete. To run unit test: \
61
- ./_build/test/torchserve_cpp_test ${COLOR_OFF} "
62
-
63
- # cd $DEPS_DIR/../..
64
- # if [ -f "$DEPS_DIR/../test/torchserve_cpp_test" ]; then
65
- # $DEPS_DIR/../test/torchserve_cpp_test
66
- # else
67
- # echo -e "${COLOR_RED}[ ERROR ] _build/test/torchserve_cpp_test not exist ${COLOR_OFF}"
68
- # exit 1
69
- # fi
60
+ echo -e " ${COLOR_GREEN} torchserve_cpp build is complete. ${COLOR_OFF} "
61
+
62
+
63
+ if [ -z " $NO_BUILD_TESTS " ]; then
64
+ make test
65
+ fi
70
66
}
71
67
72
68
# Parse args
You can’t perform that action at this time.
0 commit comments