qmake: add support for mkspecs which don't support strict_c++
Some mkspecs do not support c++ strict mode. We should allow them to build Qt with GNU extenstions. Change-Id: I0d76cf95355b38953e3475773ec5474c856e1370 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
13cb34c1b1
commit
061fbceb77
@ -42,9 +42,13 @@ QMAKE_INCDIR_POST = $${QNX_DIR}/usr/include $${QNX_DIR}/usr/include/freety
|
||||
QMAKE_LIBDIR_POST = $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib
|
||||
QMAKE_RPATHLINKDIR_POST += $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib
|
||||
|
||||
QMAKE_CXXFLAGS_CXX11 = -Wc,-std=gnu++11
|
||||
QMAKE_CXXFLAGS_CXX14 = -Wc,-std=gnu++1y
|
||||
QMAKE_CXXFLAGS_CXX1Z = -Wc,-std=gnu++1z
|
||||
QMAKE_CXXFLAGS_CXX11 =
|
||||
QMAKE_CXXFLAGS_CXX14 =
|
||||
QMAKE_CXXFLAGS_CXX1Z =
|
||||
|
||||
QMAKE_CXXFLAGS_GNUCXX11 = -Wc,-std=gnu++11
|
||||
QMAKE_CXXFLAGS_GNUCXX14 = -Wc,-std=gnu++1y
|
||||
QMAKE_CXXFLAGS_GNUCXX1Z = -Wc,-std=gnu++1z
|
||||
|
||||
QMAKE_LINK_C = $$QMAKE_CC
|
||||
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
|
||||
|
@ -134,7 +134,7 @@ c++11|c++14|c++1z {
|
||||
isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd) {
|
||||
strict_c++: QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STRICTCXX
|
||||
} else {
|
||||
!strict_c++: cxxstd = GNU$$cxxstd
|
||||
!strict_c++|isEmpty(QMAKE_CXXFLAGS_$$cxxstd): cxxstd = GNU$$cxxstd
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += $$eval(QMAKE_CXXFLAGS_$$cxxstd)
|
||||
|
Loading…
Reference in New Issue
Block a user