Upgrading dependency to Thrift 0.12.0
This commit is contained in:
parent
3e4590dcc0
commit
356978cb42
1302 changed files with 101701 additions and 26784 deletions
25
vendor/git.apache.org/thrift.git/build/cmake/ConfigureChecks.cmake
generated
vendored
25
vendor/git.apache.org/thrift.git/build/cmake/ConfigureChecks.cmake
generated
vendored
|
@ -17,17 +17,16 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
|
||||
include(CheckSymbolExists)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
# If AI_ADDRCONFIG is not defined we define it as 0
|
||||
check_symbol_exists(AI_ADDRCONFIG "sys/types.h;sys/socket.h;netdb.h" HAVE_AI_ADDRCONFIG)
|
||||
if(NOT HAVE_AI_ADDRCONFIG)
|
||||
set(AI_ADDRCONFIG 1)
|
||||
endif(NOT HAVE_AI_ADDRCONFIG)
|
||||
if (Inttypes_FOUND)
|
||||
# This allows the inttypes.h and stdint.h checks to succeed on platforms that
|
||||
# do not natively provide there.
|
||||
set (CMAKE_REQUIRED_INCLUDES ${INTTYPES_INCLUDE_DIRS})
|
||||
endif ()
|
||||
|
||||
check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
|
||||
check_include_file(fcntl.h HAVE_FCNTL_H)
|
||||
|
@ -35,18 +34,22 @@ check_include_file(getopt.h HAVE_GETOPT_H)
|
|||
check_include_file(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_file(netdb.h HAVE_NETDB_H)
|
||||
check_include_file(netinet/in.h HAVE_NETINET_IN_H)
|
||||
check_include_file(signal.h HAVE_SIGNAL_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file(pthread.h HAVE_PTHREAD_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H)
|
||||
check_include_file(sys/param.h HAVE_SYS_PARAM_H)
|
||||
check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H)
|
||||
check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file(sys/un.h HAVE_SYS_UN_H)
|
||||
check_include_file(poll.h HAVE_POLL_H)
|
||||
check_include_file(sys/poll.h HAVE_SYS_POLL_H)
|
||||
check_include_file(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_file(sched.h HAVE_SCHED_H)
|
||||
check_include_file(string.h HAVE_STRING_H)
|
||||
check_include_file(strings.h HAVE_STRINGS_H)
|
||||
|
||||
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
|
||||
|
@ -72,5 +75,5 @@ set(VERSION ${thrift_VERSION})
|
|||
|
||||
# generate a config.h file
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/thrift/config.h")
|
||||
# HACK: Some files include thrift/config.h and some config.h so we include both. This should be cleaned up.
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/thrift" "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
|
25
vendor/git.apache.org/thrift.git/build/cmake/DefineCMakeDefaults.cmake
generated
vendored
25
vendor/git.apache.org/thrift.git/build/cmake/DefineCMakeDefaults.cmake
generated
vendored
|
@ -35,7 +35,7 @@ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
|||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
# Define the generic version of the libraries here
|
||||
set(GENERIC_LIB_VERSION "0.10.0")
|
||||
set(GENERIC_LIB_VERSION "0.1.0")
|
||||
set(GENERIC_LIB_SOVERSION "0")
|
||||
|
||||
# Set the default build type to release with debug info
|
||||
|
@ -68,3 +68,26 @@ set(CMAKE_MACOSX_RPATH TRUE)
|
|||
# locations and running the executables without LD_PRELOAD or similar.
|
||||
# This requires the library to be built with rpath support.
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
#
|
||||
# C++ Language Level Defaults - this depends on the compiler capabilities
|
||||
#
|
||||
if (NOT DEFINED CMAKE_CXX_STANDARD)
|
||||
if (MSVC AND MSVC_VERSION LESS 1800)
|
||||
# MSVC 2012 and earlier don't support template aliases so you have to use C++98
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
message(STATUS "Setting C++98 as the default language level (for an older MSVC compiler).")
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 11) # C++11
|
||||
message(STATUS "Setting C++11 as the default language level.")
|
||||
endif()
|
||||
message(STATUS "To specify a different C++ language level, set CMAKE_CXX_STANDARD")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED OFF) # can degrade to C++98 if compiler does not support C++11
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # use standards compliant language level for portability
|
||||
endif()
|
||||
|
|
37
vendor/git.apache.org/thrift.git/build/cmake/DefineOptions.cmake
generated
vendored
37
vendor/git.apache.org/thrift.git/build/cmake/DefineOptions.cmake
generated
vendored
|
@ -40,7 +40,17 @@ option(BUILD_LIBRARIES "Build Thrift libraries" ON)
|
|||
# and enables the library if all are found. This means the default is to build as
|
||||
# much as possible but leaving out libraries if their dependencies are not met.
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(WITH_BOOST_STATIC "Build with Boost static link library" OFF "NOT MSVC" ON)
|
||||
option(WITH_BOOST_FUNCTIONAL "Use boost/tr1/functional.hpp even under C++11 or later" OFF)
|
||||
if (WITH_BOOST_FUNCTIONAL)
|
||||
add_definitions(-DFORCE_BOOST_FUNCTIONAL)
|
||||
endif()
|
||||
|
||||
option(WITH_BOOST_SMART_PTR "Use boost/smart_ptr.hpp even under C++11 or later" OFF)
|
||||
if (WITH_BOOST_SMART_PTR)
|
||||
add_definitions(-DFORCE_BOOST_SMART_PTR)
|
||||
endif()
|
||||
|
||||
option(WITH_BOOST_STATIC "Build with Boost static link library" OFF)
|
||||
set(Boost_USE_STATIC_LIBS ${WITH_BOOST_STATIC})
|
||||
if (NOT WITH_BOOST_STATIC)
|
||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
||||
|
@ -84,7 +94,7 @@ if(WITH_CPP)
|
|||
endif()
|
||||
CMAKE_DEPENDENT_OPTION(BUILD_CPP "Build C++ library" ON
|
||||
"BUILD_LIBRARIES;WITH_CPP;Boost_FOUND" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(WITH_PLUGIN "Build compiler plugin support" ON
|
||||
CMAKE_DEPENDENT_OPTION(WITH_PLUGIN "Build compiler plugin support" OFF
|
||||
"BUILD_COMPILER;BUILD_CPP" OFF)
|
||||
|
||||
# C GLib
|
||||
|
@ -117,10 +127,10 @@ if(ANDROID)
|
|||
CMAKE_DEPENDENT_OPTION(BUILD_JAVA "Build Java library" ON
|
||||
"BUILD_LIBRARIES;WITH_JAVA;GRADLE_FOUND" OFF)
|
||||
else()
|
||||
find_package(Gradlew QUIET)
|
||||
find_package(Java QUIET)
|
||||
find_package(Ant QUIET)
|
||||
CMAKE_DEPENDENT_OPTION(BUILD_JAVA "Build Java library" ON
|
||||
"BUILD_LIBRARIES;WITH_JAVA;JAVA_FOUND;ANT_FOUND" OFF)
|
||||
"BUILD_LIBRARIES;WITH_JAVA;JAVA_FOUND;GRADLEW_FOUND" OFF)
|
||||
endif()
|
||||
|
||||
# Python
|
||||
|
@ -164,7 +174,6 @@ message(STATUS "Thrift package version: ${PACKAGE_VERSION}
|
|||
message(STATUS "Build configuration Summary")
|
||||
message(STATUS " Build Thrift compiler: ${BUILD_COMPILER}")
|
||||
message(STATUS " Build compiler plugin support: ${WITH_PLUGIN}")
|
||||
MESSAGE_DEP(PLUGIN_COMPILER_NOT_TOO_OLD "Disabled due to older compiler")
|
||||
message(STATUS " Build with unit tests: ${BUILD_TESTING}")
|
||||
MESSAGE_DEP(HAVE_COMPILER "Disabled because BUILD_THRIFT=OFF and no valid THRIFT_COMPILER is given")
|
||||
message(STATUS " Build examples: ${BUILD_EXAMPLES}")
|
||||
|
@ -174,6 +183,7 @@ message(STATUS " Language libraries:")
|
|||
message(STATUS " Build C++ library: ${BUILD_CPP}")
|
||||
MESSAGE_DEP(WITH_CPP "Disabled by WITH_CPP=OFF")
|
||||
MESSAGE_DEP(Boost_FOUND "Boost headers missing")
|
||||
message(STATUS " C++ Language Level: ${CXX_LANGUAGE_LEVEL}")
|
||||
message(STATUS " Build C (GLib) library: ${BUILD_C_GLIB}")
|
||||
MESSAGE_DEP(WITH_C_GLIB "Disabled by WITH_C_GLIB=OFF")
|
||||
MESSAGE_DEP(GLIB_FOUND "GLib missing")
|
||||
|
@ -183,7 +193,7 @@ if(ANDROID)
|
|||
MESSAGE_DEP(GRADLE_FOUND "Gradle missing")
|
||||
else()
|
||||
MESSAGE_DEP(JAVA_FOUND "Java Runtime missing")
|
||||
MESSAGE_DEP(ANT_FOUND "Ant missing")
|
||||
MESSAGE_DEP(GRADLEW_FOUND "Gradle Wrapper missing")
|
||||
endif()
|
||||
message(STATUS " Build Python library: ${BUILD_PYTHON}")
|
||||
MESSAGE_DEP(WITH_PYTHON "Disabled by WITH_PYTHON=OFF")
|
||||
|
@ -195,16 +205,15 @@ MESSAGE_DEP(CABAL_FOUND "Cabal missing")
|
|||
message(STATUS " Library features:")
|
||||
message(STATUS " Build shared libraries: ${WITH_SHARED_LIB}")
|
||||
message(STATUS " Build static libraries: ${WITH_STATIC_LIB}")
|
||||
message(STATUS " Build with ZLIB support: ${WITH_ZLIB}")
|
||||
message(STATUS " Build with Boost static link library: ${WITH_BOOST_STATIC}")
|
||||
message(STATUS " Build with Boost thread support: ${WITH_BOOSTTHREADS}")
|
||||
message(STATUS " Build with boost/tr1/functional (forced) ${WITH_BOOST_FUNCTIONAL}")
|
||||
message(STATUS " Build with boost/smart_ptr (forced) ${WITH_BOOST_SMART_PTR}")
|
||||
message(STATUS " Build with C++ std::thread support: ${WITH_STDTHREADS}")
|
||||
message(STATUS " Build with libevent support: ${WITH_LIBEVENT}")
|
||||
message(STATUS " Build with OpenSSL support: ${WITH_OPENSSL}")
|
||||
message(STATUS " Build with Qt4 support: ${WITH_QT4}")
|
||||
message(STATUS " Build with Qt5 support: ${WITH_QT5}")
|
||||
message(STATUS " Build with OpenSSL support: ${WITH_OPENSSL}")
|
||||
message(STATUS " Build with Boost thread support: ${WITH_BOOSTTHREADS}")
|
||||
message(STATUS " Build with C++ std::thread support: ${WITH_STDTHREADS}")
|
||||
message(STATUS " Build with Boost static link library: ${WITH_BOOST_STATIC}")
|
||||
if(MSVC)
|
||||
message(STATUS " - Enabled for Visual C++")
|
||||
endif()
|
||||
message(STATUS " Build with ZLIB support: ${WITH_ZLIB}")
|
||||
message(STATUS "----------------------------------------------------------")
|
||||
endmacro(PRINT_CONFIG_SUMMARY)
|
||||
|
|
56
vendor/git.apache.org/thrift.git/build/cmake/DefinePlatformSpecifc.cmake
generated
vendored
56
vendor/git.apache.org/thrift.git/build/cmake/DefinePlatformSpecifc.cmake
generated
vendored
|
@ -17,6 +17,8 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
# Uncomment this to show some basic cmake variables about platforms
|
||||
# include (NewPlatformDebug)
|
||||
|
||||
# Visual Studio specific options
|
||||
if(MSVC)
|
||||
|
@ -71,12 +73,25 @@ if(MSVC)
|
|||
message (FATAL_ERROR "Windows build does not support shared library output yet, please set -DWITH_SHARED_LIB=off")
|
||||
endif()
|
||||
|
||||
add_definitions("/MP") # parallel build
|
||||
add_definitions("/W3") # warning level 3
|
||||
|
||||
# VS2010 does not provide inttypes which we need for "PRId64" used in many places
|
||||
find_package(Inttypes)
|
||||
if (Inttypes_FOUND)
|
||||
include_directories(${INTTYPES_INCLUDE_DIRS})
|
||||
# OpenSSL conflicts with the definition of PRId64 unless it is defined first
|
||||
add_definitions("/FIinttypes.h")
|
||||
endif ()
|
||||
elseif(UNIX)
|
||||
find_program( MEMORYCHECK_COMMAND valgrind )
|
||||
set( MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --leak-check=full" )
|
||||
set( MEMORYCHECK_SUPPRESSIONS_FILE "${PROJECT_SOURCE_DIR}/test/valgrind.suppress" )
|
||||
endif()
|
||||
|
||||
add_definitions("-D__STDC_FORMAT_MACROS")
|
||||
add_definitions("-D__STDC_LIMIT_MACROS")
|
||||
|
||||
# WITH_*THREADS selects which threading library to use
|
||||
if(WITH_BOOSTTHREADS)
|
||||
add_definitions("-DUSE_BOOST_THREAD=1")
|
||||
|
@ -84,23 +99,34 @@ elseif(WITH_STDTHREADS)
|
|||
add_definitions("-DUSE_STD_THREAD=1")
|
||||
endif()
|
||||
|
||||
# GCC and Clang.
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# FIXME -pedantic can not be used at the moment because of: https://issues.apache.org/jira/browse/THRIFT-2784
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -Wall -Wextra -pedantic")
|
||||
# FIXME enabling c++11 breaks some Linux builds on Travis by triggering a g++ bug, see
|
||||
# https://travis-ci.org/apache/thrift/jobs/58017022
|
||||
# on the other hand, both MacOSX and FreeBSD need c++11
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -Wall -Wextra")
|
||||
# C++ Language Level
|
||||
set(CXX_LANGUAGE_LEVEL "C++${CMAKE_CXX_STANDARD}")
|
||||
if (CMAKE_CXX_STANDARD_REQUIRED)
|
||||
string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [compiler must support it]")
|
||||
else()
|
||||
string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [fallback to earlier if compiler does not support it]")
|
||||
endif()
|
||||
if (CMAKE_CXX_EXTENSIONS)
|
||||
string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [with compiler-specific extensions]")
|
||||
else()
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -Wno-long-long")
|
||||
endif()
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If gcc older than 4.8 is detected, disable new compiler plug-in support (see THRIFT-3937)
|
||||
set(PLUGIN_COMPILER_NOT_TOO_OLD ON) # simplifies messaging in DefineOptions summary
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" AND WITH_PLUGIN)
|
||||
message(STATUS "Disabling compiler plug-in support to work with older gcc compiler")
|
||||
set(WITH_PLUGIN OFF)
|
||||
set(PLUGIN_COMPILER_NOT_TOO_OLD OFF)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
|
||||
endif()
|
||||
|
||||
# Building WITH_PLUGIN requires boost memory operations, for now, and gcc >= 4.8
|
||||
if (WITH_PLUGIN)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")
|
||||
message(SEND_ERROR "Thrift compiler plug-in support is not possible with older gcc ( < 4.8 ) compiler")
|
||||
endif()
|
||||
message(STATUS "Forcing use of boost::smart_ptr to build WITH_PLUGIN")
|
||||
add_definitions("-DFORCE_BOOST_SMART_PTR=1")
|
||||
endif()
|
||||
|
||||
|
|
36
vendor/git.apache.org/thrift.git/build/cmake/FindGradlew.cmake
generated
vendored
Normal file
36
vendor/git.apache.org/thrift.git/build/cmake/FindGradlew.cmake
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
|
||||
# GRADLEW_FOUND - system has Gradlew
|
||||
# GRADLEW_EXECUTABLE - the Gradlew executable
|
||||
#
|
||||
# It will search the location CMAKE_SOURCE_DIR/lib/java
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_program(GRADLEW_EXECUTABLE gradlew PATHS ${CMAKE_SOURCE_DIR}/lib/java NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
|
||||
find_package_handle_standard_args(Gradlew DEFAULT_MSG GRADLEW_EXECUTABLE)
|
||||
mark_as_advanced(GRADLEW_EXECUTABLE)
|
||||
|
||||
# Buggy find_program cannot find gradlew.bat when gradlew is at the same path
|
||||
# and even buggier ctest will not execute gradlew.bat when gradlew is given.
|
||||
if(CMAKE_HOST_WIN32)
|
||||
string(REGEX REPLACE "(.+gradlew)$" "\\1.bat" GRADLEW_EXECUTABLE ${GRADLEW_EXECUTABLE})
|
||||
endif(CMAKE_HOST_WIN32)
|
41
vendor/git.apache.org/thrift.git/build/cmake/FindInttypes.cmake
generated
vendored
Normal file
41
vendor/git.apache.org/thrift.git/build/cmake/FindInttypes.cmake
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
# find msinttypes on compilers that don't provide it, for example
|
||||
# VS2010
|
||||
|
||||
# Usage:
|
||||
# Provide INTTYPES_ROOT if you need it
|
||||
# Result: INTTYPES_INCLUDE_DIRS, where to find inttypes.h
|
||||
# Result: Inttypes_FOUND, If false, inttypes.h was not found
|
||||
|
||||
find_path(INTTYPES_INCLUDE_DIRS inttypes.h HINTS ${INTTYPES_ROOT})
|
||||
if (INTTYPES_INCLUDE_DIRS)
|
||||
set(Inttypes_FOUND TRUE)
|
||||
else ()
|
||||
set(Inttypes_FOUND FALSE)
|
||||
if (Inttypes_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find inttypes.h")
|
||||
endif ()
|
||||
message(STATUS "inttypes.h NOT found")
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(
|
||||
INTTYPES_INCLUDE_DIRS
|
||||
)
|
10
vendor/git.apache.org/thrift.git/build/cmake/FindLibevent.cmake
generated
vendored
10
vendor/git.apache.org/thrift.git/build/cmake/FindLibevent.cmake
generated
vendored
|
@ -13,9 +13,13 @@ foreach(prefix ${LibEvent_EXTRA_PREFIXES})
|
|||
list(APPEND LibEvent_LIBRARIES_PATHS "${prefix}/lib")
|
||||
endforeach()
|
||||
|
||||
find_path(LIBEVENT_INCLUDE_DIRS event.h PATHS ${LibEvent_INCLUDE_PATHS})
|
||||
# "lib" prefix is needed on Windows
|
||||
find_library(LIBEVENT_LIBRARIES NAMES event libevent PATHS ${LibEvent_LIBRARIES_PATHS})
|
||||
# Looking for "event.h" will find the Platform SDK include dir on windows
|
||||
# so we also look for a peer header like evhttp.h to get the right path
|
||||
find_path(LIBEVENT_INCLUDE_DIRS evhttp.h event.h PATHS ${LibEvent_INCLUDE_PATHS})
|
||||
|
||||
# "lib" prefix is needed on Windows in some cases
|
||||
# newer versions of libevent use three libraries
|
||||
find_library(LIBEVENT_LIBRARIES NAMES event event_core event_extra libevent PATHS ${LibEvent_LIBRARIES_PATHS})
|
||||
|
||||
if (LIBEVENT_LIBRARIES AND LIBEVENT_INCLUDE_DIRS)
|
||||
set(Libevent_FOUND TRUE)
|
||||
|
|
44
vendor/git.apache.org/thrift.git/build/cmake/NewPlatformDebug.cmake
generated
vendored
Normal file
44
vendor/git.apache.org/thrift.git/build/cmake/NewPlatformDebug.cmake
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
#
|
||||
# For debugging new platforms, just to see what some environment flags are...
|
||||
#
|
||||
macro(SHOWFLAG flag)
|
||||
message(STATUS "${flag} = ${${flag}}")
|
||||
endmacro(SHOWFLAG)
|
||||
|
||||
set(NEWPLATFORMDEBUG ON)
|
||||
|
||||
if(NEWPLATFORMDEBUG)
|
||||
SHOWFLAG("APPLE")
|
||||
SHOWFLAG("BORLAND")
|
||||
SHOWFLAG("CMAKE_C_COMPILER_ID")
|
||||
SHOWFLAG("CMAKE_CXX_COMPILER_ID")
|
||||
SHOWFLAG("CMAKE_COMPILER_IS_GNUCC")
|
||||
SHOWFLAG("CMAKE_COMPILER_IS_GNUCXX")
|
||||
SHOWFLAG("CYGWIN")
|
||||
SHOWFLAG("MINGW")
|
||||
SHOWFLAG("MSVC")
|
||||
SHOWFLAG("MSVC_VERSION")
|
||||
SHOWFLAG("MSYS")
|
||||
SHOWFLAG("UNIX")
|
||||
SHOWFLAG("WATCOM")
|
||||
SHOWFLAG("WIN32")
|
||||
endif(NEWPLATFORMDEBUG)
|
63
vendor/git.apache.org/thrift.git/build/cmake/README-MSYS2.md
generated
vendored
Normal file
63
vendor/git.apache.org/thrift.git/build/cmake/README-MSYS2.md
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
<!---
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
# Building thrift on Windows (MinGW64/MSYS2)
|
||||
|
||||
Thrift uses cmake to make it easier to build the project on multiple platforms, however to build a fully functional and production ready thrift on Windows requires a number of third party libraries to be obtained. Once third party libraries are ready, the right combination of options must be passed to cmake in order to generate the correct environment.
|
||||
|
||||
> Note: libevent and libevent-devel do not work with this toolchain as they do not properly detect mingw64 and expect some headers to exist that do not, so the non-blocking server is not currently built into this solution.
|
||||
|
||||
## MSYS2
|
||||
|
||||
Download and fully upgrade msys2 following the instructions at:
|
||||
|
||||
https://msys2.github.io/
|
||||
|
||||
Install the necessary toolchain items for C++:
|
||||
|
||||
$ pacman --needed -S bison flex make mingw-w64-x86_64-openssl \
|
||||
mingw-w64-x86_64-boost mingw-w64-x86_64-cmake \
|
||||
mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib
|
||||
|
||||
Update your msys2 bash path to include /mingw64/bin by adding a line to your ~/.bash_profiles using this command:
|
||||
|
||||
echo "export PATH=/mingw64/bin:\$PATH" >> ~/.bash_profile
|
||||
|
||||
After that, close your shell and open a new one.
|
||||
|
||||
Use cmake to create a MinGW makefile, out of tree (assumes you are in the top level of the thrift source tree):
|
||||
|
||||
mkdir ../thrift-build
|
||||
cd ../thrift-build
|
||||
cmake -G"MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=/mingw64/bin/mingw32-make \
|
||||
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc.exe \
|
||||
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++.exe \
|
||||
-DWITH_BOOSTTHREADS=ON -DWITH_LIBEVENT=OFF \
|
||||
-DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON \
|
||||
-DWITH_JAVA=OFF -DWITH_PYTHON=OFF -DWITH_PERL=OFF \
|
||||
../thrift
|
||||
|
||||
Build thrift (inside thrift-build):
|
||||
|
||||
cmake --build .
|
||||
|
||||
Run the tests (inside thrift-build):
|
||||
|
||||
ctest
|
||||
|
||||
> If you run into issues, check Apache Jira THRIFT-4046 for patches relating to MinGW64/MSYS2 builds.
|
||||
|
||||
## Tested With
|
||||
|
||||
msys2 64-bit 2016-10-26 distribution
|
18
vendor/git.apache.org/thrift.git/build/cmake/config.h.in
generated
vendored
18
vendor/git.apache.org/thrift.git/build/cmake/config.h.in
generated
vendored
|
@ -44,9 +44,6 @@
|
|||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "${PACKAGE_STRING}"
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "${VERSION}"
|
||||
|
||||
/************************** DEFINES *************************/
|
||||
|
||||
/* Define if the AI_ADDRCONFIG symbol is unavailable */
|
||||
|
@ -94,6 +91,9 @@
|
|||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#cmakedefine HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
|
||||
|
@ -103,8 +103,8 @@
|
|||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
#cmakedefine HAVE_PTHREAD_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#cmakedefine HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#cmakedefine HAVE_SYS_PARAM_H 1
|
||||
|
@ -121,12 +121,18 @@
|
|||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
#cmakedefine HAVE_SYS_UN_H 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#cmakedefine HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#cmakedefine HAVE_SYS_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
#cmakedefine HAVE_SCHED_H 1
|
||||
|
||||
|
@ -154,4 +160,4 @@
|
|||
/* Define to 1 if strerror_r returns char *. */
|
||||
#cmakedefine STRERROR_R_CHAR_P 1
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue