diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-08-01 13:31:35 -0700 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-08-25 06:25:11 +0000 |
commit | 3accdb8086cca78fc006cfbe0d8b6eb66ebcc307 (patch) | |
tree | 3417bc4b97d0109f19c3e3b7996023fa0dc569fe /configure | |
parent | 31fb4379c81c58fe471fc7d8e799a6a00c4b4ba0 (diff) |
Detect which C++ standard edition the compiler defaults to
Change-Id: I2991557a5cc74cd18e88ffff13f670bf25d5423e
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -4343,6 +4343,21 @@ if [ "$CFG_CXX11" != "no" ]; then fi fi +# Detect which edition of the C++ standard the compiler defaults to +CFG_STDCXX_DEFAULT=199711 +if compileTest common/c++default "default C++ standard edition"; then + if [ -e "$outpath/config.tests/common/c++default/c++default.ii" ]; then + CFG_STDCXX_DEFAULT=`sed -n '/^[0-9]/s/L//p' "$outpath/config.tests/common/c++default/c++default.ii"` + else + if [ "$OPT_VERBOSE" = "yes" ]; then + echo "Failed to run the preprocessor, something is wrong with your compiler" + fi + if [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + exit 101 + fi + fi +fi + # detect sse2 support if [ "${CFG_SSE2}" = "auto" ]; then if compileTest common/sse2 "sse2"; then @@ -6894,6 +6909,7 @@ fi if [ -n "$RPATH_FLAGS" ]; then echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp" fi +echo "QT_COMPILER_STDCXX = $CFG_STDCXX_DEFAULT" >> "$QTCONFIG.tmp" if [ -n "$QT_GCC_MAJOR_VERSION" ]; then echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp" echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp" |