gorealis v2 refactor (#5)
* Changing default timeout for start maintenance. * Upgrading dependencies to gorealis v2 and thrift 0.12.0 * Refactored to update to gorealis v2.
This commit is contained in:
parent
ad4dd9606e
commit
6ab5c9334d
1335 changed files with 137431 additions and 61530 deletions
59
vendor/git.apache.org/thrift.git/build/cmake/DefinePlatformSpecifc.cmake
generated
vendored
59
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)
|
||||
|
@ -59,9 +61,6 @@ if(MSVC)
|
|||
set(STATIC_POSTFIX "md" CACHE STRING "Set static library postfix" FORCE)
|
||||
endif(WITH_MT)
|
||||
|
||||
# Disable Windows.h definition of macros for min and max
|
||||
add_definitions("-DNOMINMAX")
|
||||
|
||||
# Disable boost auto linking pragmas - cmake includes the right files
|
||||
add_definitions("-DBOOST_ALL_NO_LIB")
|
||||
|
||||
|
@ -71,12 +70,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 +96,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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue