add back third_party/protobuf, but it won't be used in normal builds.

Pinned protobuf to v3.1.0

Removed the USE_SYSTEM_PROTOBUF option in cmake. It is no longer used.
This commit is contained in:
Yangqing Jia
2017-01-04 17:26:43 -08:00
parent 9d42eca92e
commit a9e2693fa8
5 changed files with 6 additions and 11 deletions

3
.gitmodules vendored
View File

@ -22,3 +22,6 @@
[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://github.com/google/benchmark.git
[submodule "third_party/protobuf"]
path = third_party/protobuf
url = https://github.com/google/protobuf.git

View File

@ -44,7 +44,6 @@ option(USE_ZMQDB "Use ZMQ" OFF)
option(USE_ROCKSDB "Use RocksDB" OFF)
option(USE_MPI "Use MPI" ON)
option(BUILD_SHARED_LIBS "Build libcaffe2.so" ON)
option(USE_SYSTEM_PROTOBUF "Use system-provided protobuf" ON)
option(USE_OPENMP "Use OpenMP for parallel code" ON)
option(BUILD_PYTHON "Build python binaries" ON)

View File

@ -8,8 +8,4 @@ add_library(Caffe_PROTO SHARED ${Caffe_PROTO_HEADERS} ${Caffe_PROTO_SRCS})
target_include_directories(Caffe_PROTO PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
install(TARGETS Caffe_PROTO DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
if(USE_SYSTEM_PROTOBUF)
target_link_libraries(Caffe_PROTO protobuf)
else()
add_dependencies(Caffe_PROTO protobuf_external)
endif()
target_link_libraries(Caffe_PROTO protobuf)

View File

@ -8,8 +8,4 @@ add_library(Caffe2_PROTO SHARED ${Caffe2_PROTO_HEADERS} ${Caffe2_PROTO_SRCS})
target_include_directories(Caffe2_PROTO PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
install(TARGETS Caffe2_PROTO DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
if (USE_SYSTEM_PROTOBUF)
target_link_libraries(Caffe2_PROTO protobuf)
else()
add_dependencies(Caffe2_PROTO protobuf_external)
endif()
target_link_libraries(Caffe2_PROTO protobuf)

1
third_party/protobuf vendored Submodule

Submodule third_party/protobuf added at 2deb139bc9