Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4165

C++ build has many warnings under c++03 due to recent changes, cmake needs better platform-independent language level control



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.11.0
    • 0.11.0
    • C++ - Library
    • None
    • Ubuntu 14.04 with gcc-4.6 (c++03)


      When not using -std=c+11 there are a number of build warnings coming out of gcc-4.6.x. These can be turned off specifically if C+11 support is not enabled for the compiler, but the compiler allows some C99 extensions (with warning).

      To better support C++ language levels, I propose changing the minimum required cmake version to 3.1 to get access to CMAKE_CXX_STANDARD.

      1. In DefineCmakeDefaults.cmake if it isn't set, set it to 11 allowing for decay, and disabling compiler-specific language extensions.
      2. Add to the DefineOptions table output showing the language level
      3. Add some command-line options to disable common warnings that occur if you use an older compiler, like "long long is a C99 thing" and "variadic macros are a C99 thing" and "register keyword is deprecated and will be removed in c++1z" (note: register is only used in flex/bison output right now).
      4. Update docker files as necessary to support new cmake minimum version. Ubuntu and debian need to change, centos6 is not used with cmake builds in CI, centos7 already has an adequate version of cmake.


        Issue Links



              jking3 James E. King III
              jking3 James E. King III
              0 Vote for this issue
              2 Start watching this issue