mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Do not build protobuf without dnn (#10689)
* Do not build protobuf if dnn is disabled * Added BUILD_LIST cmake option to the cache * Moved protobuf to the top level * Fixed static build * Fixed world build * fixup! Fixed world build
This commit is contained in:
committed by
Vadim Pisarevsky
parent
36222c9eed
commit
e56d6054aa
@@ -54,7 +54,11 @@ void shrinkCaffeModel(const String& src, const String& dst, const std::vector<St
|
||||
blob->set_raw_data_type(caffe::FLOAT16);
|
||||
}
|
||||
}
|
||||
#if GOOGLE_PROTOBUF_VERSION < 3005000
|
||||
size_t msgSize = saturate_cast<size_t>(net.ByteSize());
|
||||
#else
|
||||
size_t msgSize = net.ByteSizeLong();
|
||||
#endif
|
||||
std::vector<uint8_t> output(msgSize);
|
||||
net.SerializeWithCachedSizesToArray(&output[0]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user