Skip to content

Commit 88a72a0

Browse files
committed
Merge pull request #362 from ludv1x:dnn
2 parents 43d8816 + 6ec22ee commit 88a72a0

File tree

307 files changed

+123436
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

307 files changed

+123436
-0
lines changed

modules/dnn/3rdparty/protobuf/CHANGES.txt

Lines changed: 528 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
project(libprotobuf)
2+
3+
include(CheckIncludeFiles)
4+
include(cmake/CheckCxxHashset.cmake)
5+
include(cmake/CheckCxxHashmap.cmake)
6+
7+
check_include_files("pthread.h" HAVE_PTHREAD)
8+
9+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
10+
include(CheckIncludeFileCXX)
11+
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
12+
check_include_file_cxx("unordered_map" HAVE_UNORDERED_MAP)
13+
check_include_file_cxx("tr1/unordered_map" HAVE_TR1_UNORDERED_MAP)
14+
set(CMAKE_REQUIRED_FLAGS )
15+
16+
if(HAVE_UNORDERED_MAP)
17+
add_definitions("-std=c++11") # For unordered_map
18+
set(HASH_MAP_H "<unordered_map>")
19+
set(HASH_MAP_CLASS "unordered_map")
20+
set(HASH_NAMESPACE "std")
21+
set(HAVE_HASH_MAP 1)
22+
elseif(HAVE_TR1_UNORDERED_MAP)
23+
add_definitions("-std=c++11") # For unordered_map
24+
set(HASH_MAP_H "<tr1/unordered_map>")
25+
set(HASH_MAP_CLASS "unordered_map")
26+
set(HASH_NAMESPACE "std::tr1")
27+
set(HAVE_HASH_MAP 1)
28+
else()
29+
CHECK_HASHMAP()
30+
if(HAVE_GNU_EXT_HASH_MAP)
31+
set(HASH_MAP_H "<ext/hash_map>")
32+
set(HASH_NAMESPACE "__gnu_cxx")
33+
set(HASH_MAP_CLASS "hash_map")
34+
set(HAVE_HASH_MAP 1)
35+
elseif(HAVE_STD_EXT_HASH_MAP)
36+
set(HASH_MAP_H "<ext/hash_map>")
37+
set(HASH_NAMESPACE "std")
38+
set(HASH_MAP_CLASS "hash_map")
39+
set(HAVE_HASH_MAP 1)
40+
elseif(HAVE_GLOBAL_HASH_MAP)
41+
set(HASH_MAP_H "<ext/hash_map>")
42+
set(HASH_NAMESPACE "")
43+
set(HASH_MAP_CLASS "hash_map")
44+
set(HAVE_HASH_MAP 1)
45+
else()
46+
set(HAVE_HASH_MAP 0)
47+
endif()
48+
endif()
49+
50+
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
51+
check_include_file_cxx("unordered_set" HAVE_UNORDERED_SET)
52+
check_include_file_cxx("tr1/unordered_set" HAVE_TR1_UNORDERED_SET)
53+
set(CMAKE_REQUIRED_FLAGS )
54+
55+
if(HAVE_UNORDERED_SET)
56+
set(HASH_SET_H "<unordered_set>")
57+
set(HASH_SET_CLASS "unordered_set")
58+
set(HAVE_HASH_SET 1)
59+
elseif(HAVE_TR1_UNORDERED_SET)
60+
add_definitions("-std=c++11")
61+
set(HASH_SET_H "<tr1/unordered_set>")
62+
set(HASH_SET_CLASS "unordered_set")
63+
set(HAVE_HASH_SET 1)
64+
else()
65+
CHECK_HASHSET()
66+
if(HAVE_GNU_EXT_HASH_SET)
67+
set(HASH_SET_H "<ext/hash_set>")
68+
set(HASH_NAMESPACE "__gnu_cxx")
69+
set(HASH_SET_CLASS "hash_set")
70+
set(HAVE_HASH_SET 1)
71+
elseif(HAVE_STD_EXT_HASH_SET)
72+
set(HASH_SET_H "<ext/hash_set>")
73+
set(HASH_NAMESPACE "std")
74+
set(HASH_SET_CLASS "hash_set")
75+
set(HAVE_HASH_SET 1)
76+
elseif(HAVE_GLOBAL_HASH_SET)
77+
set(HASH_SET_H "<hash_set>")
78+
set(HASH_NAMESPACE "")
79+
set(HASH_SET_CLASS "hash_set")
80+
set(HAVE_HASH_SET 1)
81+
else()
82+
set(HAVE_HASH_SET 0)
83+
endif()
84+
endif()
85+
endif()
86+
87+
if(WIN32 AND BUILD_SHARED_LIBS AND MSVC)
88+
add_definitions(-DPROTOBUF_USE_DLLS)
89+
add_definitions(-DLIBPROTOBUF_EXPORTS)
90+
endif()
91+
92+
#add_definitions( -DGOOGLE_PROTOBUF_NO_THREAD_SAFETY ) #we don't need thread safety
93+
add_definitions( -D_GNU_SOURCE=1 ) #it's maybe useful
94+
add_definitions( -DHAVE_CONFIG_H ) #we will use config.h
95+
configure_file("cmake/config.h.in" "config.h")
96+
97+
if(MSVC)
98+
add_definitions( -D_CRT_SECURE_NO_WARNINGS=1 )
99+
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702)
100+
else()
101+
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo -Wundef)
102+
endif()
103+
104+
# Easier to support different versions of protobufs
105+
function(append_if_exist OUTPUT_LIST)
106+
set(${OUTPUT_LIST})
107+
foreach(fil ${ARGN})
108+
if(EXISTS ${fil})
109+
list(APPEND ${OUTPUT_LIST} "${fil}")
110+
else()
111+
message(WARNING "file missing: ${fil}")
112+
endif()
113+
endforeach()
114+
set(${OUTPUT_LIST} ${${OUTPUT_LIST}} PARENT_SCOPE)
115+
endfunction()
116+
117+
set(PROTOBUF_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
118+
119+
if(MSVC)
120+
set(ATOMICOPS_INTERNALS ${PROTOBUF_ROOT}/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc)
121+
else()
122+
set(ATOMICOPS_INTERNALS ${PROTOBUF_ROOT}/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc)
123+
endif()
124+
125+
append_if_exist(PROTOBUF_SRCS
126+
${PROTOBUF_ROOT}/src/google/protobuf/compiler/importer.cc
127+
${PROTOBUF_ROOT}/src/google/protobuf/compiler/parser.cc
128+
${PROTOBUF_ROOT}/src/google/protobuf/descriptor.cc
129+
${PROTOBUF_ROOT}/src/google/protobuf/descriptor.pb.cc
130+
${PROTOBUF_ROOT}/src/google/protobuf/descriptor_database.cc
131+
${PROTOBUF_ROOT}/src/google/protobuf/dynamic_message.cc
132+
${PROTOBUF_ROOT}/src/google/protobuf/extension_set.cc
133+
${PROTOBUF_ROOT}/src/google/protobuf/extension_set_heavy.cc
134+
${PROTOBUF_ROOT}/src/google/protobuf/generated_message_reflection.cc
135+
${PROTOBUF_ROOT}/src/google/protobuf/generated_message_util.cc
136+
${PROTOBUF_ROOT}/src/google/protobuf/io/coded_stream.cc
137+
${PROTOBUF_ROOT}/src/google/protobuf/io/gzip_stream.cc
138+
${PROTOBUF_ROOT}/src/google/protobuf/io/printer.cc
139+
${PROTOBUF_ROOT}/src/google/protobuf/io/tokenizer.cc
140+
${PROTOBUF_ROOT}/src/google/protobuf/io/zero_copy_stream.cc
141+
${PROTOBUF_ROOT}/src/google/protobuf/io/zero_copy_stream_impl.cc
142+
${PROTOBUF_ROOT}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
143+
${PROTOBUF_ROOT}/src/google/protobuf/message.cc
144+
${PROTOBUF_ROOT}/src/google/protobuf/message_lite.cc
145+
${PROTOBUF_ROOT}/src/google/protobuf/reflection_ops.cc
146+
${PROTOBUF_ROOT}/src/google/protobuf/repeated_field.cc
147+
${PROTOBUF_ROOT}/src/google/protobuf/service.cc
148+
${ATOMICOPS_INTERNALS}
149+
${PROTOBUF_ROOT}/src/google/protobuf/stubs/common.cc
150+
${PROTOBUF_ROOT}/src/google/protobuf/stubs/once.cc
151+
${PROTOBUF_ROOT}/src/google/protobuf/stubs/stringprintf.cc
152+
${PROTOBUF_ROOT}/src/google/protobuf/stubs/structurally_valid.cc
153+
${PROTOBUF_ROOT}/src/google/protobuf/stubs/strutil.cc
154+
${PROTOBUF_ROOT}/src/google/protobuf/stubs/substitute.cc
155+
${PROTOBUF_ROOT}/src/google/protobuf/text_format.cc
156+
${PROTOBUF_ROOT}/src/google/protobuf/unknown_field_set.cc
157+
${PROTOBUF_ROOT}/src/google/protobuf/wire_format.cc
158+
${PROTOBUF_ROOT}/src/google/protobuf/wire_format_lite.cc
159+
#${PROTOBUF_ROOT}/src/google/protobuf/stubs/hash.cc
160+
)
161+
162+
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
163+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
164+
endif()
165+
166+
add_library(libprotobuf STATIC ${PROTOBUF_SRCS})
167+
include_directories(${PROTOBUF_ROOT}/src ${CMAKE_CURRENT_BINARY_DIR})
168+
169+
set_target_properties(libprotobuf
170+
PROPERTIES
171+
OUTPUT_NAME libprotobuf
172+
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
173+
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
174+
)
175+
176+
if(ENABLE_SOLUTION_FOLDERS)
177+
set_target_properties(libprotobuf PROPERTIES FOLDER "3rdparty")
178+
endif()
179+
180+
if(NOT BUILD_SHARED_LIBS)
181+
ocv_install_target(libprotobuf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
182+
endif()
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
This file contains a list of people who have made large contributions
2+
to the public version of Protocol Buffers.
3+
4+
Original Protocol Buffers design and implementation:
5+
Sanjay Ghemawat <[email protected]>
6+
Jeff Dean <[email protected]>
7+
Daniel Dulitz <[email protected]>
8+
Craig Silverstein
9+
Paul Haahr <[email protected]>
10+
Corey Anderson <[email protected]>
11+
(and many others)
12+
13+
Proto2 C++ and Java primary author:
14+
Kenton Varda <[email protected]>
15+
16+
Proto2 Python primary authors:
17+
Will Robinson <[email protected]>
18+
Petar Petrov <[email protected]>
19+
20+
Large code contributions:
21+
Jason Hsueh <[email protected]>
22+
Joseph Schorr <[email protected]>
23+
Wenbo Zhu <[email protected]>
24+
25+
Large quantity of code reviews:
26+
Scott Bruce <[email protected]>
27+
Frank Yellin
28+
Neal Norwitz <[email protected]>
29+
Jeffrey Yasskin <[email protected]>
30+
Ambrose Feinstein <[email protected]>
31+
32+
Documentation:
33+
Lisa Carey <[email protected]>
34+
35+
Maven packaging:
36+
Gregory Kick <[email protected]>
37+
38+
Patch contributors:
39+
Kevin Ko <[email protected]>
40+
* Small patch to handle trailing slashes in --proto_path flag.
41+
Johan Euphrosine <[email protected]>
42+
* Small patch to fix Python CallMethod().
43+
Ulrich Kunitz <[email protected]>
44+
* Small optimizations to Python serialization.
45+
Leandro Lucarella <[email protected]>
46+
* VI syntax highlighting tweaks.
47+
* Fix compiler to not make output executable.
48+
Dilip Joseph <[email protected]>
49+
* Heuristic detection of sub-messages when printing unknown fields in
50+
text format.
51+
Brian Atkinson <[email protected]>
52+
* Added @Override annotation to generated Java code where appropriate.
53+
Vincent Choini�re <[email protected]>
54+
* Tru64 support.
55+
Monty Taylor <[email protected]>
56+
* Solaris 10 + Sun Studio fixes.
57+
Alek Storm <[email protected]>
58+
* Slicing support for repeated scalar fields for the Python API.
59+
Oleg Smolsky <[email protected]>
60+
* MS Visual Studio error format option.
61+
* Detect unordered_map in stl_hash.m4.
62+
Brian Olson <[email protected]>
63+
* gzip/zlib I/O support.
64+
Michael Poole <[email protected]>
65+
* Fixed warnings about generated constructors not explicitly initializing
66+
all fields (only present with certain compiler settings).
67+
* Added generation of field number constants.
68+
Wink Saville <[email protected]>
69+
* Fixed initialization ordering problem in logging code.
70+
Will Pierce <[email protected]>
71+
* Small patch improving performance of in Python serialization.
72+
Alexandre Vassalotti <[email protected]>
73+
* Emacs mode for Protocol Buffers (editors/protobuf-mode.el).
74+
Scott Stafford <[email protected]>
75+
* Added Swap(), SwapElements(), and RemoveLast() to Reflection interface.
76+
Alexander Melnikov <[email protected]>
77+
* HPUX support.
78+
Oliver Jowett <[email protected]>
79+
* Detect whether zlib is new enough in configure script.
80+
* Fixes for Solaris 10 32/64-bit confusion.
81+
Evan Jones <[email protected]>
82+
* Optimize Java serialization code when writing a small message to a stream.
83+
* Optimize Java serialization of strings so that UTF-8 encoding happens only
84+
once per string per serialization call.
85+
* Clean up some Java warnings.
86+
* Fix bug with permanent callbacks that delete themselves when run.
87+
Michael Kucharski <[email protected]>
88+
* Added CodedInputStream.getTotalBytesRead().
89+
Kacper Kowalik <[email protected]>
90+
* Fixed m4/acx_pthread.m4 problem for some Linux distributions.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Copyright 2008, Google Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are
6+
met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above
11+
copyright notice, this list of conditions and the following disclaimer
12+
in the documentation and/or other materials provided with the
13+
distribution.
14+
* Neither the name of Google Inc. nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
30+
Code generated by the Protocol Buffer compiler is owned by the owner
31+
of the input file used when generating it. This code is not
32+
standalone and requires a support library to be linked with it. This
33+
support library is itself covered by the above license.

0 commit comments

Comments
 (0)