You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2016/11/14 15:22:22 UTC

thrift git commit: THRIFT-3937 if the compiler is too old (gcc before 4.8) disable new compiler plugin during configuration Client: C++

Repository: thrift
Updated Branches:
  refs/heads/master c544975d9 -> c9877fb3b


THRIFT-3937 if the compiler is too old (gcc before 4.8) disable new compiler plugin during configuration
Client: C++

This closes #1101


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/c9877fb3
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/c9877fb3
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/c9877fb3

Branch: refs/heads/master
Commit: c9877fb3b40b99c47ab634f15bc7d1cb0acb1053
Parents: c544975
Author: James E. King, III <jk...@apache.org>
Authored: Mon Nov 14 10:20:52 2016 -0500
Committer: James E. King, III <jk...@apache.org>
Committed: Mon Nov 14 10:20:52 2016 -0500

----------------------------------------------------------------------
 build/cmake/DefineOptions.cmake         | 11 ++++++-----
 build/cmake/DefinePlatformSpecifc.cmake |  9 +++++++++
 2 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/c9877fb3/build/cmake/DefineOptions.cmake
----------------------------------------------------------------------
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 171c9fe..0c853b1 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -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:")

http://git-wip-us.apache.org/repos/asf/thrift/blob/c9877fb3/build/cmake/DefinePlatformSpecifc.cmake
----------------------------------------------------------------------
diff --git a/build/cmake/DefinePlatformSpecifc.cmake b/build/cmake/DefinePlatformSpecifc.cmake
index 01fcd37..e57ecc2 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -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()
+