Skip to content

Commit a2d6ed5

Browse files
committed
Merge pull request #8 from beniz/tf
Tf
2 parents 41ed1d0 + 9e616a1 commit a2d6ed5

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ExternalProject_Add(
6868
PREFIX tensorflow
6969
INSTALL_DIR ${CMAKE_BINARY_DIR}
7070
DOWNLOAD_COMMAND git clone --recurse-submodules https://github.com/tensorflow/tensorflow
71-
CONFIGURE_COMMAND mkdir dbuild && patch -p1 < ../../../../patches/tf/logging.h.patch && ./configure && bazel --output_base dbuild/ build //tensorflow:libtensorflow.so && cd google/protobuf && ./autogen.sh && ./configure --prefix=$ENV{HOME} && make && make install
71+
CONFIGURE_COMMAND mkdir -p dbuild && ../../../../patches/test_patch.sh ../../../../patches/tf/logging.h.patch && ./configure && bazel --output_base dbuild/ build //tensorflow:libtensorflow.so && cd google/protobuf && ./autogen.sh && ./configure --prefix=$ENV{HOME} && make && make install
7272
INSTALL_COMMAND ""
7373
BUILD_COMMAND ""
7474
BUILD_IN_SOURCE 1

patches/test_patch.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
if ! patch -R -p1 --dry-run <$1; then
3+
patch -p1 <$1
4+
fi

tests/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ find_package(GTest)
1313
include_directories(${GTEST_INCLUDE_DIRS})
1414
if (GTEST_FOUND)
1515
add_executable(ut_apidata ut-apidata.cc)
16-
target_link_libraries(ut_apidata ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS})
16+
target_link_libraries(ut_apidata ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS} ${TF_LIB_DEPS})
1717
add_test(
1818
NAME ut_apidata
1919
COMMAND ut_apidata
2020
)
2121

2222
add_executable(ut_conn ut-conn.cc)
23-
target_link_libraries(ut_conn ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS})
23+
target_link_libraries(ut_conn ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS} ${TF_LIB_DEPS})
2424
add_test(
2525
NAME ut_conn
2626
COMMAND ut_conn
2727
)
2828

2929
add_executable(ut_jsonapi ut-jsonapi.cc)
30-
target_link_libraries(ut_jsonapi ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS})
30+
target_link_libraries(ut_jsonapi ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS} ${TF_LIB_DEPS})
3131
add_test(
3232
NAME ut_jsonapi
3333
COMMAND ut_jsonapi
@@ -40,7 +40,7 @@ if (GTEST_FOUND)
4040
target_link_libraries(test_server boost_thread cppnetlib-uri cppnetlib-client-connections boost_system crypto ssl)
4141

4242
add_executable(ut_caffe_mlp ut-caffe-mlp.cc)
43-
target_link_libraries(ut_caffe_mlp ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS})
43+
target_link_libraries(ut_caffe_mlp ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS} ${TF_LIB_DEPS})
4444
add_test(
4545
NAME ut_caffe_mlp
4646
COMMAND ut_caffe_mlp
@@ -99,14 +99,14 @@ if (GTEST_FOUND)
9999
endif()
100100

101101
add_executable(ut_caffeapi ut-caffeapi.cc)
102-
target_link_libraries(ut_caffeapi ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS})
102+
target_link_libraries(ut_caffeapi ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc curlpp curl ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS} ${TF_LIB_DEPS})
103103
add_test(
104104
NAME ut_caffeapi
105105
COMMAND ut_caffeapi
106106
)
107107

108108
add_executable(ut_httpapi ut-httpapi.cc)
109-
target_link_libraries(ut_httpapi ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS} cppnetlib-uri curlpp curl crypto ssl)
109+
target_link_libraries(ut_httpapi ddetect glog gflags gtest gtest_main opencv_core opencv_highgui opencv_imgproc ${Boost_LIBRARIES} ${CAFFE_LIB_DEPS} ${TF_LIB_DEPS} cppnetlib-uri curlpp curl crypto ssl)
110110
add_test(
111111
NAME ut_httpapi
112112
COMMAND ut_httpapi

0 commit comments

Comments
 (0)