Skip to content

Commit

Permalink
qmake: Add support for CONFIG += c++17
Browse files Browse the repository at this point in the history
The correct name is c++1z. Anyhow, this is easy enough to get wrong,
so make sure CONFIG += c++17 works as well.

Task-number: QTBUG-67527
Change-Id: Iea26b18824b38b1b5170f85987cf5c750b8e10ab
Reviewed-by: Oswald Buddenhagen <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: André Hartmann <[email protected]>
  • Loading branch information
kkoehne committed Oct 15, 2018
1 parent 52070f3 commit 4522468
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mkspecs/features/default_post.prf
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ breakpad {
!isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote($$QMAKE_STRIP $$DEBUGFILENAME)
}

c++17: CONFIG += c++1z

!c++11:!c++14:!c++1z {
# Qt requires C++11 since 5.7, check if we need to force a compiler option
QT_COMPILER_STDCXX_no_L = $$replace(QT_COMPILER_STDCXX, "L$", "")
Expand Down
1 change: 1 addition & 0 deletions qmake/doc/src/qmake-manual.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,7 @@
\row \li c++1z \li C++17 support is enabled. This option has no effect if
the compiler does not support C++17, or can't select the C++ standard.
By default, support is disabled.
\row \li c++17 \li Same as c++1z.
\row \li strict_c++ \li Disables support for C++ compiler extensions.
By default, they are enabled.
\row \li depend_includepath \li Appending the value of INCLUDEPATH to
Expand Down

0 comments on commit 4522468

Please sign in to comment.