aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/protobuf/cmake
diff options
context:
space:
mode:
authorGravatar Jakob Buchgraber <buchgr@google.com>2017-04-14 21:16:19 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-04-14 21:16:19 +0200
commit8ff0d0d436b4fd9fd4199d313f708377c7a668af (patch)
tree1d0060d271adb3d6bac605c2a10768be80e09203 /third_party/protobuf/cmake
parent5235d06159ba6fee412bee261ea7867d061252b0 (diff)
Revert "protobuf: Update protobuf to @laszlocsomor's master at commit 421d909."
This reverts commit 5235d06159ba6fee412bee261ea7867d061252b0. Unfortunately, we noticed several build errors / test failures internally due this change.
Diffstat (limited to 'third_party/protobuf/cmake')
-rw-r--r--third_party/protobuf/cmake/CMakeLists.txt183
-rw-r--r--third_party/protobuf/cmake/README.md336
-rw-r--r--third_party/protobuf/cmake/examples.cmake57
-rw-r--r--third_party/protobuf/cmake/extract_includes.bat.in127
-rw-r--r--third_party/protobuf/cmake/install.cmake117
-rw-r--r--third_party/protobuf/cmake/libprotobuf-lite.cmake38
-rw-r--r--third_party/protobuf/cmake/libprotobuf.cmake72
-rw-r--r--third_party/protobuf/cmake/libprotoc.cmake120
-rw-r--r--third_party/protobuf/cmake/protobuf-config-version.cmake.in58
-rw-r--r--third_party/protobuf/cmake/protobuf-config.cmake.in13
-rw-r--r--third_party/protobuf/cmake/protobuf-module.cmake.in233
-rw-r--r--third_party/protobuf/cmake/protobuf-options.cmake7
-rw-r--r--third_party/protobuf/cmake/protoc.cmake6
-rw-r--r--third_party/protobuf/cmake/tests.cmake221
14 files changed, 0 insertions, 1588 deletions
diff --git a/third_party/protobuf/cmake/CMakeLists.txt b/third_party/protobuf/cmake/CMakeLists.txt
deleted file mode 100644
index 7618ba21a1..0000000000
--- a/third_party/protobuf/cmake/CMakeLists.txt
+++ /dev/null
@@ -1,183 +0,0 @@
-# Minimum CMake required
-cmake_minimum_required(VERSION 2.8.12)
-
-if(protobuf_VERBOSE)
- message(STATUS "Protocol Buffers Configuring...")
-endif()
-
-# CMake policies
-cmake_policy(SET CMP0022 NEW)
-
-# Project
-project(protobuf C CXX)
-
-# Options
-option(protobuf_BUILD_TESTS "Build tests" ON)
-option(protobuf_BUILD_EXAMPLES "Build examples" OFF)
-if (BUILD_SHARED_LIBS)
- set(protobuf_BUILD_SHARED_LIBS_DEFAULT ON)
-else (BUILD_SHARED_LIBS)
- set(protobuf_BUILD_SHARED_LIBS_DEFAULT OFF)
-endif (BUILD_SHARED_LIBS)
-option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHARED_LIBS_DEFAULT})
-include(CMakeDependentOption)
-cmake_dependent_option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON
- "NOT protobuf_BUILD_SHARED_LIBS" OFF)
-if (MSVC)
- set(protobuf_WITH_ZLIB_DEFAULT OFF)
-else (MSVC)
- set(protobuf_WITH_ZLIB_DEFAULT ON)
-endif (MSVC)
-option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT})
-set(protobuf_DEBUG_POSTFIX "d"
- CACHE STRING "Default debug postfix")
-mark_as_advanced(protobuf_DEBUG_POSTFIX)
-# User options
-include(protobuf-options.cmake)
-
-# Path to main configure script
-set(protobuf_CONFIGURE_SCRIPT "../configure.ac")
-
-# Parse configure script
-set(protobuf_AC_INIT_REGEX
- "^AC_INIT\\(\\[([^]]+)\\],\\[([^]]+)\\],\\[([^]]+)\\],\\[([^]]+)\\]\\)$")
-file(STRINGS "${protobuf_CONFIGURE_SCRIPT}" protobuf_AC_INIT_LINE
- LIMIT_COUNT 1 REGEX "^AC_INIT")
-# Description
-string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\1"
- protobuf_DESCRIPTION "${protobuf_AC_INIT_LINE}")
-# Version
-string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\2"
- protobuf_VERSION_STRING "${protobuf_AC_INIT_LINE}")
-# Contact
-string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\3"
- protobuf_CONTACT "${protobuf_AC_INIT_LINE}")
-# Parse version tweaks
-set(protobuf_VERSION_REGEX "^([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)$")
-string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\1"
- protobuf_VERSION_MAJOR "${protobuf_VERSION_STRING}")
-string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\2"
- protobuf_VERSION_MINOR "${protobuf_VERSION_STRING}")
-string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\3"
- protobuf_VERSION_PATCH "${protobuf_VERSION_STRING}")
-string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\4"
- protobuf_VERSION_PRERELEASE "${protobuf_VERSION_STRING}")
-
-# Package version
-set(protobuf_VERSION
- "${protobuf_VERSION_MAJOR}.${protobuf_VERSION_MINOR}.${protobuf_VERSION_PATCH}")
-
-if(protobuf_VERSION_PRERELEASE)
- set(protobuf_VERSION "${protobuf_VERSION}-${protobuf_VERSION_PRERELEASE}")
-endif()
-
-if(protobuf_VERBOSE)
- message(STATUS "Configuration script parsing status [")
- message(STATUS " Description : ${protobuf_DESCRIPTION}")
- message(STATUS " Version : ${protobuf_VERSION} (${protobuf_VERSION_STRING})")
- message(STATUS " Contact : ${protobuf_CONTACT}")
- message(STATUS "]")
-endif()
-
-add_definitions(-DGOOGLE_PROTOBUF_CMAKE_BUILD)
-
-find_package(Threads REQUIRED)
-if (CMAKE_USE_PTHREADS_INIT)
- add_definitions(-DHAVE_PTHREAD)
-endif (CMAKE_USE_PTHREADS_INIT)
-
-set(_protobuf_FIND_ZLIB)
-if (protobuf_WITH_ZLIB)
- find_package(ZLIB)
- if (ZLIB_FOUND)
- set(HAVE_ZLIB 1)
- # FindZLIB module define ZLIB_INCLUDE_DIRS variable
- # Set ZLIB_INCLUDE_DIRECTORIES for compatible
- set(ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRECTORIES} ${ZLIB_INCLUDE_DIRS})
- # Using imported target if exists
- if (TARGET ZLIB::ZLIB)
- set(ZLIB_LIBRARIES ZLIB::ZLIB)
- set(_protobuf_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
- endif (TARGET ZLIB::ZLIB)
- else (ZLIB_FOUND)
- set(HAVE_ZLIB 0)
- # Explicitly set these to empty (override NOT_FOUND) so cmake doesn't
- # complain when we use them later.
- set(ZLIB_INCLUDE_DIRECTORIES)
- set(ZLIB_LIBRARIES)
- endif (ZLIB_FOUND)
-endif (protobuf_WITH_ZLIB)
-
-if (HAVE_ZLIB)
- add_definitions(-DHAVE_ZLIB)
-endif (HAVE_ZLIB)
-
-if (protobuf_BUILD_SHARED_LIBS)
- set(protobuf_SHARED_OR_STATIC "SHARED")
-else (protobuf_BUILD_SHARED_LIBS)
- set(protobuf_SHARED_OR_STATIC "STATIC")
- # In case we are building static libraries, link also the runtime library statically
- # so that MSVCR*.DLL is not required at runtime.
- # https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
- # This is achieved by replacing msvc option /MD with /MT and /MDd with /MTd
- # http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
- if (MSVC AND protobuf_MSVC_STATIC_RUNTIME)
- foreach(flag_var
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- if(${flag_var} MATCHES "/MD")
- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- endif(${flag_var} MATCHES "/MD")
- endforeach(flag_var)
- endif (MSVC AND protobuf_MSVC_STATIC_RUNTIME)
-endif (protobuf_BUILD_SHARED_LIBS)
-
-if (MSVC)
- # Build with multiple processes
- add_definitions(/MP)
- add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4309)
- # Allow big object
- add_definitions(/bigobj)
- string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR})
- string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR})
- configure_file(extract_includes.bat.in extract_includes.bat)
-endif (MSVC)
-
-get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH)
-
-include_directories(
- ${ZLIB_INCLUDE_DIRECTORIES}
- ${protobuf_BINARY_DIR}
- ${protobuf_source_dir}/src)
-
-if (MSVC)
- # Add the "lib" prefix for generated .lib outputs.
- set(LIB_PREFIX lib)
-else (MSVC)
- # When building with "make", "lib" prefix will be added automatically by
- # the build tool.
- set(LIB_PREFIX)
-endif (MSVC)
-
-if (protobuf_UNICODE)
- add_definitions(-DUNICODE -D_UNICODE)
-endif (protobuf_UNICODE)
-
-include(libprotobuf-lite.cmake)
-include(libprotobuf.cmake)
-include(libprotoc.cmake)
-include(protoc.cmake)
-
-if (protobuf_BUILD_TESTS)
- include(tests.cmake)
-endif (protobuf_BUILD_TESTS)
-
-include(install.cmake)
-
-if (protobuf_BUILD_EXAMPLES)
- include(examples.cmake)
-endif (protobuf_BUILD_EXAMPLES)
-
-if(protobuf_VERBOSE)
- message(STATUS "Protocol Buffers Configuring done")
-endif()
diff --git a/third_party/protobuf/cmake/README.md b/third_party/protobuf/cmake/README.md
deleted file mode 100644
index 1e7410d828..0000000000
--- a/third_party/protobuf/cmake/README.md
+++ /dev/null
@@ -1,336 +0,0 @@
-This directory contains *CMake* files that can be used to build protobuf
-with *MSVC* on *Windows*. You can build the project from *Command Prompt*
-and using an *Visual Studio* IDE.
-
-You need to have [CMake](http://www.cmake.org), [Visual Studio](https://www.visualstudio.com)
-and optionally [Git](http://git-scm.com) installed on your computer before proceeding.
-
-Most of the instructions will be given to the *Сommand Prompt*, but the same
-actions can be performed using appropriate GUI tools.
-
-Environment Setup
-=================
-
-Open the appropriate *Command Prompt* from the *Start* menu.
-
-For example *VS2013 x64 Native Tools Command Prompt*:
-
- C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64>
-
-Change to your working directory:
-
- C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64>cd C:\Path\to
- C:\Path\to>
-
-Where *C:\Path\to* is path to your real working directory.
-
-Create a folder where protobuf headers/libraries/binaries will be installed after built:
-
- C:\Path\to>mkdir install
-
-If *cmake* command is not available from *Command Prompt*, add it to system *PATH* variable:
-
- C:\Path\to>set PATH=%PATH%;C:\Program Files (x86)\CMake\bin
-
-If *git* command is not available from *Command Prompt*, add it to system *PATH* variable:
-
- C:\Path\to>set PATH=%PATH%;C:\Program Files\Git\cmd
-
-Good. Now you are ready to continue.
-
-Getting Sources
-===============
-
-You can get the latest stable source packages from the
-[releases](https://github.com/google/protobuf/releases) page.
-Or you can type:
-
- C:\Path\to> git clone -b [release_tag] https://github.com/google/protobuf.git
-
-Where *[release_tag]* is a git tag like *v3.0.0-beta-1* or a branch name like *master*
-if you want to get the latest code.
-
-Go to the project folder:
-
- C:\Path\to>cd protobuf
- C:\Path\to\protobuf>
-
-Protobuf unit-tests require gmock to build. If you download protobuf source code
-from the *releases* page, the *gmock* directory should already be there. If you checkout
-the code via `git clone`, this *gmock* directory won't exist and you will have to
-download it manually or skip building protobuf unit-tests.
-
-You can download gmock as follows:
-
- C:\Path\to\protobuf>git clone -b release-1.7.0 https://github.com/google/googlemock.git gmock
-
-Then go to *gmock* folder and download gtest:
-
- C:\Path\to\protobuf>cd gmock
- C:\Path\to\protobuf\gmock>git clone -b release-1.7.0 https://github.com/google/googletest.git gtest
-
-If you absolutely don't want to build and run protobuf unit-tests, skip
-this steps and use protobuf at your own risk.
-
-Now go to *cmake* folder in protobuf sources:
-
- C:\Path\to\protobuf\gmock>cd ..\cmake
- C:\Path\to\protobuf\cmake>
-
-Good. Now you are ready to *CMake* configuration.
-
-CMake Configuration
-===================
-
-*CMake* supports a lot of different
-[generators](http://www.cmake.org/cmake/help/latest/manual/cmake-generators.7.html)
-for various native build systems.
-We are only interested in
-[Makefile](http://www.cmake.org/cmake/help/latest/manual/cmake-generators.7.html#makefile-generators)
-and
-[Visual Studio](http://www.cmake.org/cmake/help/latest/manual/cmake-generators.7.html#visual-studio-generators)
-generators.
-
-We will use shadow building to separate the temporary files from the protobuf source code.
-
-Create a temporary *build* folder and change your working directory to it:
-
- C:\Path\to\protobuf\cmake>mkdir build & cd build
- C:\Path\to\protobuf\cmake\build>
-
-The *Makefile* generator can build the project in only one configuration, so you need to build
-a separate folder for each configuration.
-
-To start using a *Release* configuration:
-
- C:\Path\to\protobuf\cmake\build>mkdir release & cd release
- C:\Path\to\protobuf\cmake\build\release>cmake -G "NMake Makefiles" ^
- -DCMAKE_BUILD_TYPE=Release ^
- -DCMAKE_INSTALL_PREFIX=../../../../install ^
- ../..
-
-It will generate *nmake* *Makefile* in current directory.
-
-To use *Debug* configuration:
-
- C:\Path\to\protobuf\cmake\build>mkdir debug & cd debug
- C:\Path\to\protobuf\cmake\build\debug>cmake -G "NMake Makefiles" ^
- -DCMAKE_BUILD_TYPE=Debug ^
- -DCMAKE_INSTALL_PREFIX=../../../../install ^
- ../..
-
-It will generate *nmake* *Makefile* in current directory.
-
-To create *Visual Studio* solution file:
-
- C:\Path\to\protobuf\cmake\build>mkdir solution & cd solution
- C:\Path\to\protobuf\cmake\build\solution>cmake -G "Visual Studio 12 2013 Win64" ^
- -DCMAKE_INSTALL_PREFIX=../../../../install ^
- ../..
-
-It will generate *Visual Studio* solution file *protobuf.sln* in current directory.
-
-If the *gmock* directory does not exist, and you do not want to build protobuf unit tests,
-you need to add *cmake* command argument `-Dprotobuf_BUILD_TESTS=OFF` to disable testing.
-
-Compiling
-=========
-
-To compile protobuf:
-
- C:\Path\to\protobuf\cmake\build\release>nmake
-
-or
-
- C:\Path\to\protobuf\cmake\build\debug>nmake
-
-And wait for the compilation to finish.
-
-If you prefer to use the IDE:
-
- * Open the generated protobuf.sln file in Microsoft Visual Studio.
- * Choose "Debug" or "Release" configuration as desired.
- * From the Build menu, choose "Build Solution".
-
-And wait for the compilation to finish.
-
-Testing
-=======
-
-To run unit-tests, first you must compile protobuf as described above.
-Then run:
-
- C:\Path\to\protobuf\cmake\build\release>nmake check
-
-or
-
- C:\Path\to\protobuf\cmake\build\debug>nmake check
-
-You can also build project *check* from Visual Studio solution.
-Yes, it may sound strange, but it works.
-
-You should see output similar to:
-
- Running main() from gmock_main.cc
- [==========] Running 1546 tests from 165 test cases.
-
- ...
-
- [==========] 1546 tests from 165 test cases ran. (2529 ms total)
- [ PASSED ] 1546 tests.
-
-To run specific tests:
-
- C:\Path\to\protobuf>cmake\build\release\tests.exe --gtest_filter=AnyTest*
- Running main() from gmock_main.cc
- Note: Google Test filter = AnyTest*
- [==========] Running 3 tests from 1 test case.
- [----------] Global test environment set-up.
- [----------] 3 tests from AnyTest
- [ RUN ] AnyTest.TestPackAndUnpack
- [ OK ] AnyTest.TestPackAndUnpack (0 ms)
- [ RUN ] AnyTest.TestPackAndUnpackAny
- [ OK ] AnyTest.TestPackAndUnpackAny (0 ms)
- [ RUN ] AnyTest.TestIs
- [ OK ] AnyTest.TestIs (0 ms)
- [----------] 3 tests from AnyTest (1 ms total)
-
- [----------] Global test environment tear-down
- [==========] 3 tests from 1 test case ran. (2 ms total)
- [ PASSED ] 3 tests.
-
-Note that the tests must be run from the source folder.
-
-If all tests are passed, safely continue.
-
-Installing
-==========
-
-To install protobuf to the specified *install* folder:
-
- C:\Path\to\protobuf\cmake\build\release>nmake install
-
-or
-
- C:\Path\to\protobuf\cmake\build\debug>nmake install
-
-You can also build project *INSTALL* from Visual Studio solution.
-It sounds not so strange and it works.
-
-This will create the following folders under the *install* location:
- * bin - that contains protobuf *protoc.exe* compiler;
- * include - that contains C++ headers and protobuf *.proto files;
- * lib - that contains linking libraries and *CMake* configuration files for *protobuf* package.
-
-Now you can if needed:
- * Copy the contents of the include directory to wherever you want to put headers.
- * Copy protoc.exe wherever you put build tools (probably somewhere in your PATH).
- * Copy linking libraries libprotobuf[d].lib, libprotobuf-lite[d].lib, and libprotoc[d].lib wherever you put libraries.
-
-To avoid conflicts between the MSVC debug and release runtime libraries, when
-compiling a debug build of your application, you may need to link against a
-debug build of libprotobufd.lib with "d" postfix. Similarly, release builds should link against
-release libprotobuf.lib library.
-
-DLLs vs. static linking
-=======================
-
-Static linking is now the default for the Protocol Buffer libraries. Due to
-issues with Win32's use of a separate heap for each DLL, as well as binary
-compatibility issues between different versions of MSVC's STL library, it is
-recommended that you use static linkage only. However, it is possible to
-build libprotobuf and libprotoc as DLLs if you really want. To do this,
-do the following:
-
- * Add an additional flag `-Dprotobuf_BUILD_SHARED_LIBS=ON` when invoking cmake
- * Follow the same steps as described in the above section.
- * When compiling your project, make sure to `#define PROTOBUF_USE_DLLS`.
-
-When distributing your software to end users, we strongly recommend that you
-do NOT install libprotobuf.dll or libprotoc.dll to any shared location.
-Instead, keep these libraries next to your binaries, in your application's
-own install directory. C++ makes it very difficult to maintain binary
-compatibility between releases, so it is likely that future versions of these
-libraries will *not* be usable as drop-in replacements.
-
-If your project is itself a DLL intended for use by third-party software, we
-recommend that you do NOT expose protocol buffer objects in your library's
-public interface, and that you statically link protocol buffers into your
-library.
-
-ZLib support
-============
-
-If you want to include GzipInputStream and GzipOutputStream
-(google/protobuf/io/gzip_stream.h) in libprotobuf, you will need to do a few
-additional steps.
-
-Obtain a copy of the zlib library. The pre-compiled DLL at zlib.net works.
-You need prepare it:
-
- * Make sure zlib's two headers are in your `C:\Path\to\install\include` path
- * Make sure zlib's linking libraries (*.lib file) is in your
- `C:\Path\to\install\lib` library path.
-
-You can also compile it from source by yourself.
-
-Getting sources:
-
- C:\Path\to>git clone -b v1.2.8 https://github.com/madler/zlib.git
- C:\Path\to>cd zlib
-
-Compiling and Installing:
-
- C:\Path\to\zlib>mkdir build & cd build
- C:\Path\to\zlib\build>mkdir release & cd release
- C:\Path\to\zlib\build\release>cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ^
- -DCMAKE_INSTALL_PREFIX=../../../install ../..
- C:\Path\to\zlib\build\release>nmake & nmake install
-
-You can make *debug* version or use *Visual Studio* generator also as before for the
-protobuf project.
-
-Now add *bin* folder from *install* to system *PATH*:
-
- C:\Path\to>set PATH=%PATH%;C:\Path\to\install\bin
-
-You need reconfigure protobuf with flag `-Dprotobuf_WITH_ZLIB=ON` when invoking cmake.
-
-Note that if you have compiled ZLIB yourself, as stated above,
-further disable the option `-Dprotobuf_MSVC_STATIC_RUNTIME=OFF`.
-
-If it reports NOTFOUND for zlib_include or zlib_lib, you might haven't put
-the headers or the .lib file in the right directory.
-
-Build and testing protobuf as usual.
-
-Notes on Compiler Warnings
-==========================
-
-The following warnings have been disabled while building the protobuf libraries
-and compiler. You may have to disable some of them in your own project as
-well, or live with them.
-
-* C4018 - 'expression' : signed/unsigned mismatch
-* C4146 - unary minus operator applied to unsigned type, result still unsigned
-* C4244 - Conversion from 'type1' to 'type2', possible loss of data.
-* C4251 - 'identifier' : class 'type' needs to have dll-interface to be used by
- clients of class 'type2'
-* C4267 - Conversion from 'size_t' to 'type', possible loss of data.
-* C4305 - 'identifier' : truncation from 'type1' to 'type2'
-* C4355 - 'this' : used in base member initializer list
-* C4800 - 'type' : forcing value to bool 'true' or 'false' (performance warning)
-* C4996 - 'function': was declared deprecated
-
-C4251 is of particular note, if you are compiling the Protocol Buffer library
-as a DLL (see previous section). The protocol buffer library uses templates in
-its public interfaces. MSVC does not provide any reasonable way to export
-template classes from a DLL. However, in practice, it appears that exporting
-templates is not necessary anyway. Since the complete definition of any
-template is available in the header files, anyone importing the DLL will just
-end up compiling instances of the templates into their own binary. The
-Protocol Buffer implementation does not rely on static template members being
-unique, so there should be no problem with this, but MSVC prints warning
-nevertheless. So, we disable it. Unfortunately, this warning will also be
-produced when compiling code which merely uses protocol buffers, meaning you
-may have to disable it in your code too.
diff --git a/third_party/protobuf/cmake/examples.cmake b/third_party/protobuf/cmake/examples.cmake
deleted file mode 100644
index e5cad63f67..0000000000
--- a/third_party/protobuf/cmake/examples.cmake
+++ /dev/null
@@ -1,57 +0,0 @@
-if(protobuf_VERBOSE)
- message(STATUS "Protocol Buffers Examples Configuring...")
-endif()
-
-get_filename_component(examples_dir "../examples" ABSOLUTE)
-
-if(protobuf_VERBOSE)
- message(STATUS "Protocol Buffers Examples Configuring done")
-endif()
-include(ExternalProject)
-
-# Internal utility function: Create a custom target representing a build of examples with custom options.
-function(add_examples_build NAME)
-
- ExternalProject_Add(${NAME}
- PREFIX ${NAME}
- SOURCE_DIR "${examples_dir}"
- BINARY_DIR ${NAME}
- STAMP_DIR ${NAME}/logs
- INSTALL_COMMAND "" #Skip
- LOG_CONFIGURE 1
- CMAKE_CACHE_ARGS "-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
- "-Dprotobuf_VERBOSE:BOOL=${protobuf_VERBOSE}"
- ${ARGN}
- )
- set_property(TARGET ${NAME} PROPERTY FOLDER "Examples")
- set_property(TARGET ${NAME} PROPERTY EXCLUDE_FROM_ALL TRUE)
-endfunction()
-
-# Add examples as an external project.
-# sub_directory cannot be used because the find_package(protobuf) call would cause failures with redefined targets.
-add_examples_build(examples "-Dprotobuf_DIR:PATH=${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}")
-add_dependencies(examples libprotobuf protoc)
-
-option(protobuf_BUILD_EXAMPLES_MULTITEST "Build Examples in multiple configurations. Useful for testing." OFF)
-mark_as_advanced(protobuf_BUILD_EXAMPLES_MULTITEST)
-if(protobuf_BUILD_EXAMPLES_MULTITEST)
- set_property(GLOBAL PROPERTY USE_FOLDERS ON)
-
- #Build using the legacy compatibility module.
- add_examples_build(examples-legacy
- "-Dprotobuf_DIR:PATH=${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}"
- "-Dprotobuf_MODULE_COMPATIBLE:BOOL=TRUE"
- )
- add_dependencies(examples-legacy libprotobuf protoc)
-
- #Build using the installed library.
- add_examples_build(examples-installed
- "-Dprotobuf_DIR:PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}"
- )
-
- #Build using the installed library in legacy compatibility mode.
- add_examples_build(examples-installed-legacy
- "-Dprotobuf_DIR:PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}"
- "-Dprotobuf_MODULE_COMPATIBLE:BOOL=TRUE"
- )
-endif()
diff --git a/third_party/protobuf/cmake/extract_includes.bat.in b/third_party/protobuf/cmake/extract_includes.bat.in
deleted file mode 100644
index a4fd762258..0000000000
--- a/third_party/protobuf/cmake/extract_includes.bat.in
+++ /dev/null
@@ -1,127 +0,0 @@
-mkdir include
-mkdir include\google
-mkdir include\google\protobuf
-mkdir include\google\protobuf\compiler
-mkdir include\google\protobuf\compiler\cpp
-mkdir include\google\protobuf\compiler\csharp
-mkdir include\google\protobuf\compiler\java
-mkdir include\google\protobuf\compiler\javanano
-mkdir include\google\protobuf\compiler\js
-mkdir include\google\protobuf\compiler\objectivec
-mkdir include\google\protobuf\compiler\php
-mkdir include\google\protobuf\compiler\python
-mkdir include\google\protobuf\compiler\ruby
-mkdir include\google\protobuf\io
-mkdir include\google\protobuf\stubs
-mkdir include\google\protobuf\util
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\any.h" include\google\protobuf\any.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\any.pb.h" include\google\protobuf\any.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\api.pb.h" include\google\protobuf\api.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\arena.h" include\google\protobuf\arena.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\arenastring.h" include\google\protobuf\arenastring.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\code_generator.h" include\google\protobuf\compiler\code_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\command_line_interface.h" include\google\protobuf\compiler\command_line_interface.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\cpp\cpp_generator.h" include\google\protobuf\compiler\cpp\cpp_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\csharp\csharp_generator.h" include\google\protobuf\compiler\csharp\csharp_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\csharp\csharp_names.h" include\google\protobuf\compiler\csharp\csharp_names.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\importer.h" include\google\protobuf\compiler\importer.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\java\java_generator.h" include\google\protobuf\compiler\java\java_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\java\java_names.h" include\google\protobuf\compiler\java\java_names.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\javanano\javanano_generator.h" include\google\protobuf\compiler\javanano\javanano_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\js\js_generator.h" include\google\protobuf\compiler\js\js_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\js\well_known_types_embed.h" include\google\protobuf\compiler\js\well_known_types_embed.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\objectivec\objectivec_generator.h" include\google\protobuf\compiler\objectivec\objectivec_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\objectivec\objectivec_helpers.h" include\google\protobuf\compiler\objectivec\objectivec_helpers.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\parser.h" include\google\protobuf\compiler\parser.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\php\php_generator.h" include\google\protobuf\compiler\php\php_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.h" include\google\protobuf\compiler\plugin.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.pb.h" include\google\protobuf\compiler\plugin.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\python\python_generator.h" include\google\protobuf\compiler\python\python_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\ruby\ruby_generator.h" include\google\protobuf\compiler\ruby\ruby_generator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor.h" include\google\protobuf\descriptor.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor.pb.h" include\google\protobuf\descriptor.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor_database.h" include\google\protobuf\descriptor_database.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\duration.pb.h" include\google\protobuf\duration.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\dynamic_message.h" include\google\protobuf\dynamic_message.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\empty.pb.h" include\google\protobuf\empty.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\extension_set.h" include\google\protobuf\extension_set.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\field_mask.pb.h" include\google\protobuf\field_mask.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_reflection.h" include\google\protobuf\generated_enum_reflection.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_util.h" include\google\protobuf\generated_enum_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_reflection.h" include\google\protobuf\generated_message_reflection.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_util.h" include\google\protobuf\generated_message_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\has_bits.h" include\google\protobuf\has_bits.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\gzip_stream.h" include\google\protobuf\io\gzip_stream.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\printer.h" include\google\protobuf\io\printer.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\strtod.h" include\google\protobuf\io\strtod.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\tokenizer.h" include\google\protobuf\io\tokenizer.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\zero_copy_stream.h" include\google\protobuf\io\zero_copy_stream.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\zero_copy_stream_impl.h" include\google\protobuf\io\zero_copy_stream_impl.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\zero_copy_stream_impl_lite.h" include\google\protobuf\io\zero_copy_stream_impl_lite.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map.h" include\google\protobuf\map.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_entry.h" include\google\protobuf\map_entry.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_entry_lite.h" include\google\protobuf\map_entry_lite.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_field.h" include\google\protobuf\map_field.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_field_inl.h" include\google\protobuf\map_field_inl.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_field_lite.h" include\google\protobuf\map_field_lite.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_type_handler.h" include\google\protobuf\map_type_handler.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message.h" include\google\protobuf\message.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message_lite.h" include\google\protobuf\message_lite.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\metadata.h" include\google\protobuf\metadata.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection.h" include\google\protobuf\reflection.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection_ops.h" include\google\protobuf\reflection_ops.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\repeated_field.h" include\google\protobuf\repeated_field.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\service.h" include\google\protobuf\service.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\source_context.pb.h" include\google\protobuf\source_context.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\struct.pb.h" include\google\protobuf\struct.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomic_sequence_num.h" include\google\protobuf\stubs\atomic_sequence_num.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops.h" include\google\protobuf\stubs\atomicops.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_arm64_gcc.h" include\google\protobuf\stubs\atomicops_internals_arm64_gcc.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_arm_gcc.h" include\google\protobuf\stubs\atomicops_internals_arm_gcc.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_arm_qnx.h" include\google\protobuf\stubs\atomicops_internals_arm_qnx.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_atomicword_compat.h" include\google\protobuf\stubs\atomicops_internals_atomicword_compat.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_generic_c11_atomic.h" include\google\protobuf\stubs\atomicops_internals_generic_c11_atomic.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_generic_gcc.h" include\google\protobuf\stubs\atomicops_internals_generic_gcc.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_mips_gcc.h" include\google\protobuf\stubs\atomicops_internals_mips_gcc.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_power.h" include\google\protobuf\stubs\atomicops_internals_power.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_ppc_gcc.h" include\google\protobuf\stubs\atomicops_internals_ppc_gcc.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_solaris.h" include\google\protobuf\stubs\atomicops_internals_solaris.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_tsan.h" include\google\protobuf\stubs\atomicops_internals_tsan.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_x86_gcc.h" include\google\protobuf\stubs\atomicops_internals_x86_gcc.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h" include\google\protobuf\stubs\atomicops_internals_x86_msvc.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\bytestream.h" include\google\protobuf\stubs\bytestream.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\callback.h" include\google\protobuf\stubs\callback.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\casts.h" include\google\protobuf\stubs\casts.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\once.h" include\google\protobuf\stubs\once.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\platform_macros.h" include\google\protobuf\stubs\platform_macros.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\port.h" include\google\protobuf\stubs\port.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\scoped_ptr.h" include\google\protobuf\stubs\scoped_ptr.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\shared_ptr.h" include\google\protobuf\stubs\shared_ptr.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\singleton.h" include\google\protobuf\stubs\singleton.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\status.h" include\google\protobuf\stubs\status.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\stl_util.h" include\google\protobuf\stubs\stl_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\stringpiece.h" include\google\protobuf\stubs\stringpiece.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\template_util.h" include\google\protobuf\stubs\template_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\type_traits.h" include\google\protobuf\stubs\type_traits.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\text_format.h" include\google\protobuf\text_format.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\timestamp.pb.h" include\google\protobuf\timestamp.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\type.pb.h" include\google\protobuf\type.pb.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\unknown_field_set.h" include\google\protobuf\unknown_field_set.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\field_comparator.h" include\google\protobuf\util\field_comparator.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\field_mask_util.h" include\google\protobuf\util\field_mask_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\json_util.h" include\google\protobuf\util\json_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\message_differencer.h" include\google\protobuf\util\message_differencer.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\time_util.h" include\google\protobuf\util\time_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\type_resolver.h" include\google\protobuf\util\type_resolver.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\type_resolver_util.h" include\google\protobuf\util\type_resolver_util.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format.h" include\google\protobuf\wire_format.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format_lite.h" include\google\protobuf\wire_format_lite.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format_lite_inl.h" include\google\protobuf\wire_format_lite_inl.h
-copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wrappers.pb.h" include\google\protobuf\wrappers.pb.h
diff --git a/third_party/protobuf/cmake/install.cmake b/third_party/protobuf/cmake/install.cmake
deleted file mode 100644
index 28dc90dc3f..0000000000
--- a/third_party/protobuf/cmake/install.cmake
+++ /dev/null
@@ -1,117 +0,0 @@
-include(GNUInstallDirs)
-
-foreach(_library
- libprotobuf-lite
- libprotobuf
- libprotoc)
- set_property(TARGET ${_library}
- PROPERTY INTERFACE_INCLUDE_DIRECTORIES
- $<BUILD_INTERFACE:${protobuf_source_dir}/src>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
- install(TARGETS ${_library} EXPORT protobuf-targets
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_library}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
-endforeach()
-
-install(TARGETS protoc EXPORT protobuf-targets
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
-
-file(STRINGS extract_includes.bat.in _extract_strings
- REGEX "^copy")
-foreach(_extract_string ${_extract_strings})
- string(REGEX REPLACE "^.* .+ include\\\\(.+)$" "\\1"
- _header ${_extract_string})
- string(REPLACE "\\" "/" _header ${_header})
- get_filename_component(_extract_from "${protobuf_SOURCE_DIR}/../src/${_header}" ABSOLUTE)
- get_filename_component(_extract_name ${_header} NAME)
- get_filename_component(_extract_to "${CMAKE_INSTALL_INCLUDEDIR}/${_header}" PATH)
- if(EXISTS "${_extract_from}")
- install(FILES "${_extract_from}"
- DESTINATION "${_extract_to}"
- COMPONENT protobuf-headers
- RENAME "${_extract_name}")
- else()
- message(AUTHOR_WARNING "The file \"${_extract_from}\" is listed in "
- "\"${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in\" "
- "but there not exists. The file will not be installed.")
- endif()
-endforeach()
-
-# Internal function for parsing auto tools scripts
-function(_protobuf_auto_list FILE_NAME VARIABLE)
- file(STRINGS ${FILE_NAME} _strings)
- set(_list)
- foreach(_string ${_strings})
- set(_found)
- string(REGEX MATCH "^[ \t]*${VARIABLE}[ \t]*=[ \t]*" _found "${_string}")
- if(_found)
- string(LENGTH "${_found}" _length)
- string(SUBSTRING "${_string}" ${_length} -1 _draft_list)
- foreach(_item ${_draft_list})
- string(STRIP "${_item}" _item)
- list(APPEND _list "${_item}")
- endforeach()
- endif()
- endforeach()
- set(${VARIABLE} ${_list} PARENT_SCOPE)
-endfunction()
-
-# Install well-known type proto files
-_protobuf_auto_list("../src/Makefile.am" nobase_dist_proto_DATA)
-foreach(_file ${nobase_dist_proto_DATA})
- get_filename_component(_file_from "../src/${_file}" ABSOLUTE)
- get_filename_component(_file_name ${_file} NAME)
- get_filename_component(_file_path ${_file} PATH)
- if(EXISTS "${_file_from}")
- install(FILES "${_file_from}"
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_file_path}"
- COMPONENT protobuf-protos
- RENAME "${_file_name}")
- else()
- message(AUTHOR_WARNING "The file \"${_file_from}\" is listed in "
- "\"${protobuf_SOURCE_DIR}/../src/Makefile.am\" as nobase_dist_proto_DATA "
- "but there not exists. The file will not be installed.")
- endif()
-endforeach()
-
-# Install configuration
-set(_cmakedir_desc "Directory relative to CMAKE_INSTALL to install the cmake configuration files")
-if(NOT MSVC)
- set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/protobuf" CACHE STRING "${_cmakedir_desc}")
-else()
- set(CMAKE_INSTALL_CMAKEDIR "cmake" CACHE STRING "${_cmakedir_desc}")
-endif()
-mark_as_advanced(CMAKE_INSTALL_CMAKEDIR)
-
-configure_file(protobuf-config.cmake.in
- ${CMAKE_INSTALL_CMAKEDIR}/protobuf-config.cmake @ONLY)
-configure_file(protobuf-config-version.cmake.in
- ${CMAKE_INSTALL_CMAKEDIR}/protobuf-config-version.cmake @ONLY)
-configure_file(protobuf-module.cmake.in
- ${CMAKE_INSTALL_CMAKEDIR}/protobuf-module.cmake @ONLY)
-configure_file(protobuf-options.cmake
- ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY)
-
-# Allows the build directory to be used as a find directory.
-export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc
- NAMESPACE protobuf::
- FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake
-)
-
-install(EXPORT protobuf-targets
- DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
- NAMESPACE protobuf::
- COMPONENT protobuf-export)
-
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/
- DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
- COMPONENT protobuf-export
- PATTERN protobuf-targets.cmake EXCLUDE
-)
-
-option(protobuf_INSTALL_EXAMPLES "Install the examples folder" OFF)
-if(protobuf_INSTALL_EXAMPLES)
- install(DIRECTORY ../examples/ DESTINATION examples
- COMPONENT protobuf-examples)
-endif()
diff --git a/third_party/protobuf/cmake/libprotobuf-lite.cmake b/third_party/protobuf/cmake/libprotobuf-lite.cmake
deleted file mode 100644
index 036b051707..0000000000
--- a/third_party/protobuf/cmake/libprotobuf-lite.cmake
+++ /dev/null
@@ -1,38 +0,0 @@
-set(libprotobuf_lite_files
- ${protobuf_source_dir}/src/google/protobuf/arena.cc
- ${protobuf_source_dir}/src/google/protobuf/arenastring.cc
- ${protobuf_source_dir}/src/google/protobuf/extension_set.cc
- ${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc
- ${protobuf_source_dir}/src/google/protobuf/io/coded_stream.cc
- ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc
- ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/message_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/repeated_field.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/common.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/int128.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/once.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/status.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/statusor.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/strutil.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/time.cc
- ${protobuf_source_dir}/src/google/protobuf/wire_format_lite.cc
-)
-
-add_library(libprotobuf-lite ${protobuf_SHARED_OR_STATIC}
- ${libprotobuf_lite_files})
-target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT})
-target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src)
-if(MSVC AND protobuf_BUILD_SHARED_LIBS)
- target_compile_definitions(libprotobuf-lite
- PUBLIC PROTOBUF_USE_DLLS
- PRIVATE LIBPROTOBUF_EXPORTS)
-endif()
-set_target_properties(libprotobuf-lite PROPERTIES
- OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
- DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
diff --git a/third_party/protobuf/cmake/libprotobuf.cmake b/third_party/protobuf/cmake/libprotobuf.cmake
deleted file mode 100644
index 5313d39ef8..0000000000
--- a/third_party/protobuf/cmake/libprotobuf.cmake
+++ /dev/null
@@ -1,72 +0,0 @@
-set(libprotobuf_files
- ${protobuf_source_dir}/src/google/protobuf/any.cc
- ${protobuf_source_dir}/src/google/protobuf/any.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/api.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/importer.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/parser.cc
- ${protobuf_source_dir}/src/google/protobuf/descriptor.cc
- ${protobuf_source_dir}/src/google/protobuf/descriptor.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/descriptor_database.cc
- ${protobuf_source_dir}/src/google/protobuf/duration.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/dynamic_message.cc
- ${protobuf_source_dir}/src/google/protobuf/empty.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/extension_set_heavy.cc
- ${protobuf_source_dir}/src/google/protobuf/field_mask.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.cc
- ${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc
- ${protobuf_source_dir}/src/google/protobuf/io/printer.cc
- ${protobuf_source_dir}/src/google/protobuf/io/strtod.cc
- ${protobuf_source_dir}/src/google/protobuf/io/tokenizer.cc
- ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.cc
- ${protobuf_source_dir}/src/google/protobuf/map_field.cc
- ${protobuf_source_dir}/src/google/protobuf/message.cc
- ${protobuf_source_dir}/src/google/protobuf/reflection_ops.cc
- ${protobuf_source_dir}/src/google/protobuf/service.cc
- ${protobuf_source_dir}/src/google/protobuf/source_context.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/struct.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/mathlimits.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/substitute.cc
- ${protobuf_source_dir}/src/google/protobuf/text_format.cc
- ${protobuf_source_dir}/src/google/protobuf/timestamp.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/type.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/unknown_field_set.cc
- ${protobuf_source_dir}/src/google/protobuf/util/delimited_message_util.cc
- ${protobuf_source_dir}/src/google/protobuf/util/field_comparator.cc
- ${protobuf_source_dir}/src/google/protobuf/util/field_mask_util.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/datapiece.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/default_value_objectwriter.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/error_listener.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/field_mask_utility.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_escaping.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_objectwriter.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_stream_parser.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/object_writer.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/proto_writer.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectsource.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectwriter.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/type_info.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/type_info_test_helper.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/utility.cc
- ${protobuf_source_dir}/src/google/protobuf/util/json_util.cc
- ${protobuf_source_dir}/src/google/protobuf/util/message_differencer.cc
- ${protobuf_source_dir}/src/google/protobuf/util/time_util.cc
- ${protobuf_source_dir}/src/google/protobuf/util/type_resolver_util.cc
- ${protobuf_source_dir}/src/google/protobuf/wire_format.cc
- ${protobuf_source_dir}/src/google/protobuf/wrappers.pb.cc
-)
-
-add_library(libprotobuf ${protobuf_SHARED_OR_STATIC}
- ${libprotobuf_lite_files} ${libprotobuf_files})
-target_link_libraries(libprotobuf ${CMAKE_THREAD_LIBS_INIT})
-if(protobuf_WITH_ZLIB)
- target_link_libraries(libprotobuf ${ZLIB_LIBRARIES})
-endif()
-target_include_directories(libprotobuf PUBLIC ${protobuf_source_dir}/src)
-if(MSVC AND protobuf_BUILD_SHARED_LIBS)
- target_compile_definitions(libprotobuf
- PUBLIC PROTOBUF_USE_DLLS
- PRIVATE LIBPROTOBUF_EXPORTS)
-endif()
-set_target_properties(libprotobuf PROPERTIES
- OUTPUT_NAME ${LIB_PREFIX}protobuf
- DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
diff --git a/third_party/protobuf/cmake/libprotoc.cmake b/third_party/protobuf/cmake/libprotoc.cmake
deleted file mode 100644
index 29b3253873..0000000000
--- a/third_party/protobuf/cmake/libprotoc.cmake
+++ /dev/null
@@ -1,120 +0,0 @@
-set(libprotoc_files
- ${protobuf_source_dir}/src/google/protobuf/compiler/code_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_extension.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_file.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_helpers.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_map_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_field_base.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_helpers.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_map_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_context.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_file.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_lazy_message_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_name_resolver.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_service.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_shared_code_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_enum.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_extension.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_file.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_helpers.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_map_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/php/php_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.pb.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/python/python_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.cc
-)
-
-set(js_well_known_types_sources
- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/any.js
- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/struct.js
- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/timestamp.js
-)
-add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc)
-add_custom_command(
- OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
- DEPENDS js_embed ${js_well_known_types_sources}
- COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
-)
-
-add_library(libprotoc ${protobuf_SHARED_OR_STATIC}
- ${libprotoc_files})
-target_link_libraries(libprotoc libprotobuf)
-if(MSVC AND protobuf_BUILD_SHARED_LIBS)
- target_compile_definitions(libprotoc
- PUBLIC PROTOBUF_USE_DLLS
- PRIVATE LIBPROTOC_EXPORTS)
-endif()
-set_target_properties(libprotoc PROPERTIES
- COMPILE_DEFINITIONS LIBPROTOC_EXPORTS
- OUTPUT_NAME ${LIB_PREFIX}protoc
- DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
diff --git a/third_party/protobuf/cmake/protobuf-config-version.cmake.in b/third_party/protobuf/cmake/protobuf-config-version.cmake.in
deleted file mode 100644
index 0036c9ef54..0000000000
--- a/third_party/protobuf/cmake/protobuf-config-version.cmake.in
+++ /dev/null
@@ -1,58 +0,0 @@
-set(PACKAGE_VERSION "@protobuf_VERSION@")
-set(${PACKAGE_FIND_NAME}_VERSION_PRERELEASE "@protobuf_VERSION_PRERELEASE@" PARENT_SCOPE)
-
-# Prerelease versions cannot be passed in directly via the find_package command,
-# so we allow users to specify it in a variable
-if(NOT DEFINED "${PACKAGE_FIND_NAME}_FIND_VERSION_PRERELEASE")
- set("${${PACKAGE_FIND_NAME}_FIND_VERSION_PRERELEASE}" "")
-else()
- set(PACKAGE_FIND_VERSION ${PACKAGE_FIND_VERSION}-${${PACKAGE_FIND_NAME}_FIND_VERSION_PRERELEASE})
-endif()
-set(PACKAGE_FIND_VERSION_PRERELEASE "${${PACKAGE_FIND_NAME}_FIND_VERSION_PRERELEASE}")
-
-# VERSION_EQUAL ignores the prerelease strings, so we use STREQUAL.
-if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
- set(PACKAGE_VERSION_EXACT TRUE)
-endif()
-
-set(PACKAGE_VERSION_COMPATIBLE TRUE) #Assume true until shown otherwise
-
-if(NOT PACKAGE_FIND_VERSION_MAJOR EQUAL "@protobuf_VERSION_MAJOR@")
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-elseif(PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-elseif(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
- # Do not match prerelease versions to non-prerelease version requests.
- if(NOT "@protobuf_VERSION_PRERELEASE@" STREQUAL "" AND PACKAGE_FIND_VERSION_PRERELEASE STREQUAL "")
- message(AUTHOR_WARNING "To use this prerelease version of ${PACKAGE_FIND_NAME}, set ${PACKAGE_FIND_NAME}_FIND_VERSION_PRERELEASE to '@protobuf_VERSION_PRERELEASE@' or greater.")
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
- endif()
-
- # Not robustly SemVer compliant, but protobuf never uses '.' separated prerelease identifiers.
- if(PACKAGE_FIND_VERSION_PRERELEASE STRGREATER "@protobuf_VERSION_PRERELEASE@")
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
- endif()
-endif()
-
-# Check and save build options used to create this package
-macro(_check_and_save_build_option OPTION VALUE)
- if(DEFINED ${PACKAGE_FIND_NAME}_${OPTION} AND
- NOT ${PACKAGE_FIND_NAME}_${OPTION} EQUAL VALUE)
- set(PACKAGE_VERSION_UNSUITABLE TRUE)
- endif()
- set(${PACKAGE_FIND_NAME}_${OPTION} ${VALUE})
-endmacro()
-_check_and_save_build_option(WITH_ZLIB @protobuf_WITH_ZLIB@)
-_check_and_save_build_option(MSVC_STATIC_RUNTIME @protobuf_MSVC_STATIC_RUNTIME@)
-_check_and_save_build_option(BUILD_SHARED_LIBS @protobuf_BUILD_SHARED_LIBS@)
-
-# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "" AND NOT "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
- # check that the installed version has the same 32/64bit-ness as the one which is currently searching:
- if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
- math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
- set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
- set(PACKAGE_VERSION_UNSUITABLE TRUE)
- endif()
-endif()
-
diff --git a/third_party/protobuf/cmake/protobuf-config.cmake.in b/third_party/protobuf/cmake/protobuf-config.cmake.in
deleted file mode 100644
index a044fe5c67..0000000000
--- a/third_party/protobuf/cmake/protobuf-config.cmake.in
+++ /dev/null
@@ -1,13 +0,0 @@
-# User options
-include("${CMAKE_CURRENT_LIST_DIR}/protobuf-options.cmake")
-
-# Depend packages
-@_protobuf_FIND_ZLIB@
-
-# Imported targets
-include("${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake")
-
-# CMake FindProtobuf module compatible file
-if(protobuf_MODULE_COMPATIBLE)
- include("${CMAKE_CURRENT_LIST_DIR}/protobuf-module.cmake")
-endif()
diff --git a/third_party/protobuf/cmake/protobuf-module.cmake.in b/third_party/protobuf/cmake/protobuf-module.cmake.in
deleted file mode 100644
index 614e4c0454..0000000000
--- a/third_party/protobuf/cmake/protobuf-module.cmake.in
+++ /dev/null
@@ -1,233 +0,0 @@
-# Functions
-
-function(PROTOBUF_GENERATE_CPP SRCS HDRS)
- if(NOT ARGN)
- message(SEND_ERROR "Error: PROTOBUF_GENERATE_CPP() called without any proto files")
- return()
- endif()
-
- if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
- # Create an include path for each file specified
- foreach(FIL ${ARGN})
- get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
- get_filename_component(ABS_PATH ${ABS_FIL} PATH)
- list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
- if(${_contains_already} EQUAL -1)
- list(APPEND _protobuf_include_path -I ${ABS_PATH})
- endif()
- endforeach()
- else()
- set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
- if(DEFINED Protobuf_IMPORT_DIRS)
- foreach(DIR ${Protobuf_IMPORT_DIRS})
- get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
- list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
- if(${_contains_already} EQUAL -1)
- list(APPEND _protobuf_include_path -I ${ABS_PATH})
- endif()
- endforeach()
- endif()
-
- set(${SRCS})
- set(${HDRS})
- foreach(FIL ${ARGN})
- get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
- get_filename_component(FIL_WE ${FIL} NAME_WE)
-
- list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc")
- list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h")
-
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc"
- "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
- COMMAND ${Protobuf_PROTOC_EXECUTABLE}
- ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
- DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE}
- COMMENT "Running C++ protocol buffer compiler on ${FIL}"
- VERBATIM )
- endforeach()
-
- set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
- set(${SRCS} ${${SRCS}} PARENT_SCOPE)
- set(${HDRS} ${${HDRS}} PARENT_SCOPE)
-endfunction()
-
-function(PROTOBUF_GENERATE_PYTHON SRCS)
- if(NOT ARGN)
- message(SEND_ERROR "Error: PROTOBUF_GENERATE_PYTHON() called without any proto files")
- return()
- endif()
-
- if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
- # Create an include path for each file specified
- foreach(FIL ${ARGN})
- get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
- get_filename_component(ABS_PATH ${ABS_FIL} PATH)
- list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
- if(${_contains_already} EQUAL -1)
- list(APPEND _protobuf_include_path -I ${ABS_PATH})
- endif()
- endforeach()
- else()
- set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
- if(DEFINED Protobuf_IMPORT_DIRS)
- foreach(DIR ${Protobuf_IMPORT_DIRS})
- get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
- list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
- if(${_contains_already} EQUAL -1)
- list(APPEND _protobuf_include_path -I ${ABS_PATH})
- endif()
- endforeach()
- endif()
-
- set(${SRCS})
- foreach(FIL ${ARGN})
- get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
- get_filename_component(FIL_WE ${FIL} NAME_WE)
-
- list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py")
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py"
- COMMAND ${Protobuf_PROTOC_EXECUTABLE} --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
- DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE}
- COMMENT "Running Python protocol buffer compiler on ${FIL}"
- VERBATIM )
- endforeach()
-
- set(${SRCS} ${${SRCS}} PARENT_SCOPE)
-endfunction()
-
-# Environment
-
-# Backwards compatibility
-# Define camel case versions of input variables
-foreach(UPPER
- PROTOBUF_SRC_ROOT_FOLDER
- PROTOBUF_IMPORT_DIRS
- PROTOBUF_DEBUG
- PROTOBUF_LIBRARY
- PROTOBUF_PROTOC_LIBRARY
- PROTOBUF_INCLUDE_DIR
- PROTOBUF_PROTOC_EXECUTABLE
- PROTOBUF_LIBRARY_DEBUG
- PROTOBUF_PROTOC_LIBRARY_DEBUG
- PROTOBUF_LITE_LIBRARY
- PROTOBUF_LITE_LIBRARY_DEBUG
- )
- if (DEFINED ${UPPER})
- string(REPLACE "PROTOBUF_" "Protobuf_" Camel ${UPPER})
- if (NOT DEFINED ${Camel})
- set(${Camel} ${${UPPER}})
- endif()
- endif()
-endforeach()
-
-if(DEFINED Protobuf_SRC_ROOT_FOLDER)
- message(AUTHOR_WARNING "Variable Protobuf_SRC_ROOT_FOLDER defined, but not"
- " used in CONFIG mode")
-endif()
-
-include(SelectLibraryConfigurations)
-
-# Internal function: search for normal library as well as a debug one
-# if the debug one is specified also include debug/optimized keywords
-# in *_LIBRARIES variable
-function(_protobuf_find_libraries name filename)
- if(${name}_LIBRARIES)
- # Use result recorded by a previous call.
- elseif(${name}_LIBRARY)
- # Honor cache entry used by CMake 3.5 and lower.
- set(${name}_LIBRARIES "${${name}_LIBRARY}" PARENT_SCOPE)
- else()
- get_target_property(${name}_LIBRARY_RELEASE protobuf::lib${filename}
- LOCATION_RELEASE)
- get_target_property(${name}_LIBRARY_DEBUG protobuf::lib${filename}
- LOCATION_DEBUG)
-
- select_library_configurations(${name})
- set(${name}_LIBRARY ${${name}_LIBRARY} PARENT_SCOPE)
- set(${name}_LIBRARIES ${${name}_LIBRARIES} PARENT_SCOPE)
- endif()
-endfunction()
-
-# Internal function: find threads library
-function(_protobuf_find_threads)
- set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
- find_package(Threads)
- if(Threads_FOUND)
- list(APPEND PROTOBUF_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
- set(PROTOBUF_LIBRARIES "${PROTOBUF_LIBRARIES}" PARENT_SCOPE)
- endif()
-endfunction()
-
-#
-# Main.
-#
-
-# By default have PROTOBUF_GENERATE_CPP macro pass -I to protoc
-# for each directory where a proto file is referenced.
-if(NOT DEFINED PROTOBUF_GENERATE_CPP_APPEND_PATH)
- set(PROTOBUF_GENERATE_CPP_APPEND_PATH TRUE)
-endif()
-
-# The Protobuf library
-_protobuf_find_libraries(Protobuf protobuf)
-
-# The Protobuf Lite library
-_protobuf_find_libraries(Protobuf_LITE protobuf-lite)
-
-# The Protobuf Protoc Library
-_protobuf_find_libraries(Protobuf_PROTOC protoc)
-
-if(UNIX)
- _protobuf_find_threads()
-endif()
-
-# Set the include directory
-get_target_property(Protobuf_INCLUDE_DIRS protobuf::libprotobuf
- INTERFACE_INCLUDE_DIRECTORIES)
-
-# Set the protoc Executable
-get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
- IMPORTED_LOCATION_RELEASE)
-if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
- get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
- IMPORTED_LOCATION_DEBUG)
-endif()
-
-# Version info variable
-set(Protobuf_VERSION "@protobuf_VERSION@")
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Protobuf
- REQUIRED_VARS Protobuf_PROTOC_EXECUTABLE Protobuf_LIBRARIES Protobuf_INCLUDE_DIRS
- VERSION_VAR Protobuf_VERSION
-)
-
-# Backwards compatibility
-# Define upper case versions of output variables
-foreach(Camel
- Protobuf_VERSION
- Protobuf_SRC_ROOT_FOLDER
- Protobuf_IMPORT_DIRS
- Protobuf_DEBUG
- Protobuf_INCLUDE_DIRS
- Protobuf_LIBRARIES
- Protobuf_PROTOC_LIBRARIES
- Protobuf_LITE_LIBRARIES
- Protobuf_LIBRARY
- Protobuf_PROTOC_LIBRARY
- Protobuf_INCLUDE_DIR
- Protobuf_PROTOC_EXECUTABLE
- Protobuf_LIBRARY_DEBUG
- Protobuf_PROTOC_LIBRARY_DEBUG
- Protobuf_LITE_LIBRARY
- Protobuf_LITE_LIBRARY_DEBUG
- )
- string(TOUPPER ${Camel} UPPER)
- set(${UPPER} ${${Camel}})
-endforeach()
diff --git a/third_party/protobuf/cmake/protobuf-options.cmake b/third_party/protobuf/cmake/protobuf-options.cmake
deleted file mode 100644
index 47fb158257..0000000000
--- a/third_party/protobuf/cmake/protobuf-options.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# Verbose output
-option(protobuf_VERBOSE "Enable for verbose output" OFF)
-mark_as_advanced(protobuf_VERBOSE)
-
-# FindProtobuf module compatibel
-option(protobuf_MODULE_COMPATIBLE "CMake build-in FindProtobuf.cmake module compatible" OFF)
-mark_as_advanced(protobuf_MODULE_COMPATIBLE)
diff --git a/third_party/protobuf/cmake/protoc.cmake b/third_party/protobuf/cmake/protoc.cmake
deleted file mode 100644
index 4f07c389c9..0000000000
--- a/third_party/protobuf/cmake/protoc.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-set(protoc_files
- ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
-)
-
-add_executable(protoc ${protoc_files})
-target_link_libraries(protoc libprotobuf libprotoc)
diff --git a/third_party/protobuf/cmake/tests.cmake b/third_party/protobuf/cmake/tests.cmake
deleted file mode 100644
index 1470e4b036..0000000000
--- a/third_party/protobuf/cmake/tests.cmake
+++ /dev/null
@@ -1,221 +0,0 @@
-if (NOT EXISTS "${PROJECT_SOURCE_DIR}/../gmock/CMakeLists.txt")
- message(FATAL_ERROR "Cannot find gmock directory.")
-endif()
-
-option(protobuf_ABSOLUTE_TEST_PLUGIN_PATH
- "Using absolute test_plugin path in tests" ON)
-mark_as_advanced(protobuf_ABSOLUTE_TEST_PLUGIN_PATH)
-
-include_directories(
- ${protobuf_source_dir}/gmock
- ${protobuf_source_dir}/gmock/gtest
- ${protobuf_source_dir}/gmock/gtest/include
- ${protobuf_source_dir}/gmock/include
-)
-
-add_library(gmock STATIC
- ${protobuf_source_dir}/gmock/src/gmock-all.cc
- ${protobuf_source_dir}/gmock/gtest/src/gtest-all.cc
-)
-target_link_libraries(gmock ${CMAKE_THREAD_LIBS_INIT})
-add_library(gmock_main STATIC ${protobuf_source_dir}/gmock/src/gmock_main.cc)
-target_link_libraries(gmock_main gmock)
-
-set(lite_test_protos
- google/protobuf/map_lite_unittest.proto
- google/protobuf/unittest_import_lite.proto
- google/protobuf/unittest_import_public_lite.proto
- google/protobuf/unittest_lite.proto
- google/protobuf/unittest_no_arena_lite.proto
-)
-
-set(tests_protos
- google/protobuf/any_test.proto
- google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
- google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto
- google/protobuf/map_proto2_unittest.proto
- google/protobuf/map_unittest.proto
- google/protobuf/unittest.proto
- google/protobuf/unittest_arena.proto
- google/protobuf/unittest_custom_options.proto
- google/protobuf/unittest_drop_unknown_fields.proto
- google/protobuf/unittest_embed_optimize_for.proto
- google/protobuf/unittest_empty.proto
- google/protobuf/unittest_import.proto
- google/protobuf/unittest_import_public.proto
- google/protobuf/unittest_lite_imports_nonlite.proto
- google/protobuf/unittest_mset.proto
- google/protobuf/unittest_mset_wire_format.proto
- google/protobuf/unittest_no_arena.proto
- google/protobuf/unittest_no_arena_import.proto
- google/protobuf/unittest_no_field_presence.proto
- google/protobuf/unittest_no_generic_services.proto
- google/protobuf/unittest_optimize_for.proto
- google/protobuf/unittest_preserve_unknown_enum.proto
- google/protobuf/unittest_preserve_unknown_enum2.proto
- google/protobuf/unittest_proto3_arena.proto
- google/protobuf/unittest_proto3_arena_lite.proto
- google/protobuf/unittest_proto3_lite.proto
- google/protobuf/unittest_well_known_types.proto
- google/protobuf/util/internal/testdata/anys.proto
- google/protobuf/util/internal/testdata/books.proto
- google/protobuf/util/internal/testdata/default_value.proto
- google/protobuf/util/internal/testdata/default_value_test.proto
- google/protobuf/util/internal/testdata/field_mask.proto
- google/protobuf/util/internal/testdata/maps.proto
- google/protobuf/util/internal/testdata/oneofs.proto
- google/protobuf/util/internal/testdata/proto3.proto
- google/protobuf/util/internal/testdata/struct.proto
- google/protobuf/util/internal/testdata/timestamp_duration.proto
- google/protobuf/util/internal/testdata/wrappers.proto
- google/protobuf/util/json_format_proto3.proto
- google/protobuf/util/message_differencer_unittest.proto
-)
-
-macro(compile_proto_file filename)
- get_filename_component(dirname ${filename} PATH)
- get_filename_component(basename ${filename} NAME_WE)
- add_custom_command(
- OUTPUT ${protobuf_source_dir}/src/${dirname}/${basename}.pb.cc
- DEPENDS protoc ${protobuf_source_dir}/src/${dirname}/${basename}.proto
- COMMAND protoc ${protobuf_source_dir}/src/${dirname}/${basename}.proto
- --proto_path=${protobuf_source_dir}/src
- --cpp_out=${protobuf_source_dir}/src
- )
-endmacro(compile_proto_file)
-
-set(lite_test_proto_files)
-foreach(proto_file ${lite_test_protos})
- compile_proto_file(${proto_file})
- string(REPLACE .proto .pb.cc pb_file ${proto_file})
- set(lite_test_proto_files ${lite_test_proto_files}
- ${protobuf_source_dir}/src/${pb_file})
-endforeach(proto_file)
-
-set(tests_proto_files)
-foreach(proto_file ${tests_protos})
- compile_proto_file(${proto_file})
- string(REPLACE .proto .pb.cc pb_file ${proto_file})
- set(tests_proto_files ${tests_proto_files}
- ${protobuf_source_dir}/src/${pb_file})
-endforeach(proto_file)
-
-set(common_test_files
- ${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/map_test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/testing/file.cc
- ${protobuf_source_dir}/src/google/protobuf/testing/googletest.cc
-)
-
-set(common_lite_test_files
- ${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/map_lite_test_util.cc
- ${protobuf_source_dir}/src/google/protobuf/test_util_lite.cc
-)
-
-set(tests_files
- ${protobuf_source_dir}/src/google/protobuf/any_test.cc
- ${protobuf_source_dir}/src/google/protobuf/arena_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/arenastring_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/metadata_test.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/importer_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_plugin_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/parser_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/python/python_plugin_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/descriptor_database_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/descriptor_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/drop_unknown_fields_test.cc
- ${protobuf_source_dir}/src/google/protobuf/dynamic_message_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/extension_set_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/generated_message_reflection_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/io/coded_stream_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/io/printer_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/io/tokenizer_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/map_field_test.cc
- ${protobuf_source_dir}/src/google/protobuf/map_test.cc
- ${protobuf_source_dir}/src/google/protobuf/message_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/no_field_presence_test.cc
- ${protobuf_source_dir}/src/google/protobuf/preserve_unknown_enum_test.cc
- ${protobuf_source_dir}/src/google/protobuf/proto3_arena_lite_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/proto3_arena_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/proto3_lite_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/reflection_ops_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/repeated_field_reflection_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/repeated_field_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/bytestream_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/common_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/int128_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/once_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/status_test.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/statusor_test.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/strutil_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/template_util_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/time_test.cc
- ${protobuf_source_dir}/src/google/protobuf/stubs/type_traits_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/text_format_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/unknown_field_set_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/util/delimited_message_util_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/field_comparator_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/field_mask_util_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/default_value_objectwriter_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_objectwriter_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/json_stream_parser_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectsource_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/internal/type_info_test_helper.cc
- ${protobuf_source_dir}/src/google/protobuf/util/json_util_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/message_differencer_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/util/time_util_test.cc
- ${protobuf_source_dir}/src/google/protobuf/util/type_resolver_util_test.cc
- ${protobuf_source_dir}/src/google/protobuf/well_known_types_unittest.cc
- ${protobuf_source_dir}/src/google/protobuf/wire_format_unittest.cc
-)
-
-if(protobuf_ABSOLUTE_TEST_PLUGIN_PATH)
- add_compile_options(-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH="$<TARGET_FILE:test_plugin>")
-endif()
-
-add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
-target_link_libraries(tests libprotoc libprotobuf gmock_main)
-
-set(test_plugin_files
- ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/testing/file.cc
- ${protobuf_source_dir}/src/google/protobuf/testing/file.h
- ${protobuf_source_dir}/src/google/protobuf/compiler/test_plugin.cc
-)
-
-add_executable(test_plugin ${test_plugin_files})
-target_link_libraries(test_plugin libprotoc libprotobuf gmock)
-
-set(lite_test_files
- ${protobuf_source_dir}/src/google/protobuf/lite_unittest.cc
-)
-add_executable(lite-test ${lite_test_files} ${common_lite_test_files} ${lite_test_proto_files})
-target_link_libraries(lite-test libprotobuf-lite)
-
-set(lite_arena_test_files
- ${protobuf_source_dir}/src/google/protobuf/lite_arena_unittest.cc
-)
-add_executable(lite-arena-test ${lite_arena_test_files} ${common_lite_test_files} ${lite_test_proto_files})
-target_link_libraries(lite-arena-test libprotobuf-lite gmock_main)
-
-add_custom_target(check
- COMMAND tests
- DEPENDS tests test_plugin
- WORKING_DIRECTORY ${protobuf_source_dir})