未验证 提交 99283fb4 编写于 作者: W wuzewu 提交者: GitHub

change the protobuf version to 3.1.0 (#518)

上级 845a74b8
...@@ -184,7 +184,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -184,7 +184,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
PREFIX ${PROTOBUF_SOURCES_DIR} PREFIX ${PROTOBUF_SOURCES_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
URL https://github.com/google/protobuf/archive/v3.5.2.zip URL https://github.com/google/protobuf/archive/v3.1.0.zip
CONFIGURE_COMMAND CONFIGURE_COMMAND
${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake ${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake
${OPTIONAL_ARGS} ${OPTIONAL_ARGS}
...@@ -210,7 +210,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -210,7 +210,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
PREFIX ${PROTOBUF_SOURCES_DIR} PREFIX ${PROTOBUF_SOURCES_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
DEPENDS zlib DEPENDS zlib
URL https://github.com/google/protobuf/archive/v3.5.2.zip URL https://github.com/google/protobuf/archive/v3.1.0.zip
CONFIGURE_COMMAND CONFIGURE_COMMAND
${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake ${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake
${OPTIONAL_ARGS} ${OPTIONAL_ARGS}
...@@ -229,7 +229,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -229,7 +229,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
ENDIF(MSVC) ENDIF(MSVC)
ENDFUNCTION() ENDFUNCTION()
SET(PROTOBUF_VERSION 3.5) SET(PROTOBUF_VERSION 3.1)
IF(CMAKE_CROSSCOMPILING) IF(CMAKE_CROSSCOMPILING)
build_protobuf(protobuf_host TRUE) build_protobuf(protobuf_host TRUE)
LIST(APPEND external_project_dependencies protobuf_host) LIST(APPEND external_project_dependencies protobuf_host)
......
...@@ -8,4 +8,4 @@ Pillow==5.0.0 ...@@ -8,4 +8,4 @@ Pillow==5.0.0
pre-commit==1.5.1 pre-commit==1.5.1
flask==0.12.2 flask==0.12.2
six==1.11.0 six==1.11.0
protobuf==3.5.1 protobuf>=3.1.0
...@@ -43,7 +43,7 @@ VERSION_NUMBER = read('VERSION_NUMBER') ...@@ -43,7 +43,7 @@ VERSION_NUMBER = read('VERSION_NUMBER')
LICENSE = readlines('LICENSE')[0].strip() LICENSE = readlines('LICENSE')[0].strip()
# use memcache to reduce disk read frequency. # use memcache to reduce disk read frequency.
install_requires = ['Flask', 'numpy', 'Pillow', 'protobuf', 'scipy'] install_requires = ['Flask', 'numpy', 'Pillow', 'protobuf >= 3.1.0', 'scipy']
execute_requires = ['npm', 'node', 'bash', 'cmake', 'unzip'] execute_requires = ['npm', 'node', 'bash', 'cmake', 'unzip']
if platform == "win32": if platform == "win32":
execute_requires = ['node', 'powershell', 'cmake'] execute_requires = ['node', 'powershell', 'cmake']
......
...@@ -21,7 +21,7 @@ Storage::Storage() { ...@@ -21,7 +21,7 @@ Storage::Storage() {
data_ = std::make_shared<storage::Storage>(); data_ = std::make_shared<storage::Storage>();
tablets_ = std::make_shared<std::map<std::string, storage::Tablet>>(); tablets_ = std::make_shared<std::map<std::string, storage::Tablet>>();
modes_ = std::make_shared<std::set<std::string>>(); modes_ = std::make_shared<std::set<std::string>>();
modified_tablet_set_ = std::unordered_set<std::string>(); modified_tablet_set_ = std::set<std::string>();
time_t t; time_t t;
time(&t); time(&t);
data_->set_timestamp(t); data_->set_timestamp(t);
......
...@@ -90,7 +90,7 @@ private: ...@@ -90,7 +90,7 @@ private:
std::shared_ptr<std::map<std::string, storage::Tablet>> tablets_; std::shared_ptr<std::map<std::string, storage::Tablet>> tablets_;
std::shared_ptr<storage::Storage> data_; std::shared_ptr<storage::Storage> data_;
std::shared_ptr<std::set<std::string>> modes_; std::shared_ptr<std::set<std::string>> modes_;
std::unordered_set<std::string> modified_tablet_set_; std::set<std::string> modified_tablet_set_;
}; };
// Storage reader, each method will trigger a reading from disk. // Storage reader, each method will trigger a reading from disk.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册