Skip to content

Commit 5660373

Browse files
committed
cmake
1 parent 8788669 commit 5660373

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

src/CMakeLists.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@ cmake_minimum_required(VERSION 2.8)
22

33
include_directories(
44
${PROJECT_SOURCE_DIR}/../tensorflow
5+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow
6+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/gen/host_obj
57
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/gen/proto
68
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/gen/protobuf-host/include
9+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/downloads
710
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/downloads/eigen
11+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/downloads/gemmlowp
812
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/downloads/nsync/public
13+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/downloads/fft2d
914
${PROJECT_SOURCE_DIR}/include)
1015

1116
link_directories(
12-
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/gen/lib)
17+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/gen/lib/ios_X86_64
18+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/gen/protobuf-host/lib
19+
${PROJECT_SOURCE_DIR}/../tensorflow/tensorflow/contrib/makefile/gen/protobuf_ios/lib/iossim_x86_64/lib)
1320

14-
set(deep_ctr_LINKER_LIBS "")
15-
list(APPEND deep_ctr_LINKER_LIBS libtensorflow-core.a)
21+
set(DEEP_CTR_LINKER_LIBS "")
22+
list(APPEND DEEP_CTR_LINKER_LIBS libtensorflow-core-x86_64.a libprotobuf-lite.a libprotobuf.a pthread m z)
1623

1724
# executable
18-
set(exec_name "test.bin")
19-
add_executable(${exec_name} "test.cc")
25+
set(TEST "test.bin")
26+
add_executable(${TEST} "test.cc")
2027
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/bin")
21-
target_link_libraries(${exec_name} ${deep_ctr_LINKER_LIBS})
28+
target_link_libraries(${TEST} ${DEEP_CTR_LINKER_LIBS})

src/test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int main(int argc, char* argv[]) {
1111
std::cout << status.ToString() << "\n";
1212
return 1;
1313
}
14-
14+
/*
1515
// Read in the protobuf graph we exported
1616
// (The path seems to be relative to the cwd. Keep this in mind
1717
// when using `bazel run` since the cwd isn't where you call
@@ -65,7 +65,7 @@ int main(int argc, char* argv[]) {
6565
// Print the results
6666
std::cout << outputs[0].DebugString() << "\n"; // Tensor<type: float shape: [] values: 30>
6767
std::cout << output_c() << "\n"; // 30
68-
68+
*/
6969
// Free any resources used by the session
7070
session->Close();
7171
return 0;

0 commit comments

Comments
 (0)