mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-3937 if the compiler is too old (gcc before 4.8) disable new compiler plugin during configuration
Client: C++ This closes #1101
This commit is contained in:
parent
c544975d91
commit
c9877fb3b4
@ -164,6 +164,7 @@ 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}")
|
||||
@ -171,13 +172,13 @@ MESSAGE_DEP(HAVE_COMPILER "Disabled because BUILD_THRIFT=OFF and no valid THRIFT
|
||||
message(STATUS " Build Thrift libraries: ${BUILD_LIBRARIES}")
|
||||
message(STATUS " Language libraries:")
|
||||
message(STATUS " Build C++ library: ${BUILD_CPP}")
|
||||
MESSAGE_DEP(WITH_CPP "Disabled by via WITH_CPP=OFF")
|
||||
MESSAGE_DEP(WITH_CPP "Disabled by WITH_CPP=OFF")
|
||||
MESSAGE_DEP(Boost_FOUND "Boost headers missing")
|
||||
message(STATUS " Build C (GLib) library: ${BUILD_C_GLIB}")
|
||||
MESSAGE_DEP(WITH_C_GLIB "Disabled by via WITH_C_GLIB=OFF")
|
||||
MESSAGE_DEP(WITH_C_GLIB "Disabled by WITH_C_GLIB=OFF")
|
||||
MESSAGE_DEP(GLIB_FOUND "GLib missing")
|
||||
message(STATUS " Build Java library: ${BUILD_JAVA}")
|
||||
MESSAGE_DEP(WITH_JAVA "Disabled by via WITH_JAVA=OFF")
|
||||
MESSAGE_DEP(WITH_JAVA "Disabled by WITH_JAVA=OFF")
|
||||
if(ANDROID)
|
||||
MESSAGE_DEP(GRADLE_FOUND "Gradle missing")
|
||||
else()
|
||||
@ -185,10 +186,10 @@ else()
|
||||
MESSAGE_DEP(ANT_FOUND "Ant missing")
|
||||
endif()
|
||||
message(STATUS " Build Python library: ${BUILD_PYTHON}")
|
||||
MESSAGE_DEP(WITH_PYTHON "Disabled by via WITH_PYTHON=OFF")
|
||||
MESSAGE_DEP(WITH_PYTHON "Disabled by WITH_PYTHON=OFF")
|
||||
MESSAGE_DEP(PYTHONLIBS_FOUND "Python libraries missing")
|
||||
message(STATUS " Build Haskell library: ${BUILD_HASKELL}")
|
||||
MESSAGE_DEP(WITH_HASKELL "Disabled by via WITH_HASKELL=OFF")
|
||||
MESSAGE_DEP(WITH_HASKELL "Disabled by WITH_HASKELL=OFF")
|
||||
MESSAGE_DEP(GHC_FOUND "GHC missing")
|
||||
MESSAGE_DEP(CABAL_FOUND "Cabal missing")
|
||||
message(STATUS " Library features:")
|
||||
|
@ -95,3 +95,12 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -Wall -Wextra")
|
||||
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)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user