From ff4444065158285b573c6fc0a91c9e75fc7ddd96 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 8 Jul 2015 14:09:10 -0700 Subject: Make CONFIG += c++11 by default not disable GNU extensions Prefer -std=gnu++11 unless strict_c++11 is defined. You can enable strict C++11/C++14 mode by using CONFIG += strict_c++ That is enabled for Qt's own code, so we we don't accidentally use GNU extensions in portable code. There's no support for strict C++98 mode (that is, the -ansi option). [ChangeLog][qmake] By default, GNU extensions are now enabled with Clang, GCC and ICC even in C++11 and C++14 modes. To disable the GNU extensions, add to your .pro file: CONFIG += strict_c++. Change-Id: Ib056b47dde3341ef9a52ffff13ef14de2169bef5 Reviewed-by: Kai Koehne Reviewed-by: Oswald Buddenhagen --- src/tools/bootstrap/bootstrap.pro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tools/bootstrap') diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index be6bcadacb..d5909e68a3 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -4,9 +4,6 @@ TARGET = QtBootstrap QT = CONFIG += internal_module force_bootstrap -# otherwise mingw headers do not declare common functions like putenv -mingw:QMAKE_CXXFLAGS_CXX11 = -std=gnu++0x - MODULE_DEFINES = \ QT_BOOTSTRAPPED \ QT_LITE_UNICODE \ @@ -49,6 +46,9 @@ QMAKE_SYNCQT_OPTIONS += -version $$QT_VERSION load(qt_module) +# otherwise mingw headers do not declare common functions like putenv +mingw: CONFIG -= strict_c++ + SOURCES += \ ../../corelib/codecs/qlatincodec.cpp \ ../../corelib/codecs/qtextcodec.cpp \ -- cgit v1.2.3