Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45065

Add -c++14 flag (or equivalent change) to configure script

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.0 Beta
    • 5.4.1
    • Build System
    • None
    • Mac OS 10.10 / XCode 6.2 / Apple clang 6.0 (== clang 3.5) … but relevant on other platforms too.

    • 4684c1afe5fdb3774d56d85a52b2feaab1b8de2c

    Description

      At the moment it is possible to pass the option “-c++11” to the configure script to cause Qt to be built with C++11 support. I assume that (importantly) this also passes the appropriate compiler options /while building Qt/, allowing Qt code to take advantage of C++11 features when available.

      A similar option should be added to support building Qt using the compiler in C++14 mode. Clearly[1] Qt is already starting to use C++14 features, and so it should be possible to configure the build of Qt so that it runs the compiler in a way which will take advantage of them while /building/ Qt!

      Alternatively (perhaps better but also perhaps more work), the “-c++11” flag for the configure script should be deprecated and a “-c++version=” flag should be added, so I can say “-c++version=11”, “-c++version=14”, etc.

      Aside: for current Apple Clang, the required flag is “-std=c++1y”.

      (would have added labels c++14, configure, build, buildsystem, … but I'm not allowed to add labels!

      [1] http://woboq.com/blog/cpp14-in-qt.html

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              gallafent William Gallafent
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes