Remove the c++default test

This test was the old way of checking whether to enable
c++11 functionality. That is now anyway required, so there
is no need for this test anymore.

Change-Id: I083e85a4698cac6bd9b573525c7b977f63e14113
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Lars Knoll 2016-03-10 13:41:38 +01:00
parent a332a7d6c3
commit d1b09dba45
5 changed files with 1 additions and 50 deletions

View File

@ -1 +0,0 @@
__cplusplus

View File

@ -1,14 +0,0 @@
TEMPLATE = aux
CONFIG -= qt c++11
PREPROCESSOR_SOURCES += c++default.cpp
preprocessor.commands = $(CXX) $(CXXFLAGS) $(INCPATH) -o $@ -E $<
msvc:preprocessor.commands = $(CXX) $(CXXFLAGS) $(INCPATH) -E ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
preprocessor.output = ${QMAKE_FILE_BASE}.ii
preprocessor.input = PREPROCESSOR_SOURCES
preprocessor.variable_out = GENERATED_FILES
QMAKE_EXTRA_COMPILERS += preprocessor
all.target = all
all.depends += c++default.ii
QMAKE_EXTRA_TARGETS += all

16
configure vendored
View File

@ -4427,21 +4427,6 @@ if $stdcxx_error && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
exit 101
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 whether 64-bit std::atomic works -- some 32-bit platforms require extra library support
if compileTest common/atomic64 "64-bit std::atomic"; then
CFG_ATOMIC64=yes
@ -6941,7 +6926,6 @@ fi
if [ -n "$RPATH_FLAGS" ]; then
echo "QMAKE_RPATHDIR += $RPATH_FLAGS"
fi
echo "QT_COMPILER_STDCXX = $CFG_STDCXX_DEFAULT"
if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION"
echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION"

View File

@ -8,7 +8,7 @@ CONFIG = \
testcase_targets import_plugins import_qpa_plugin \
$$CONFIG
contains(QT_CONFIG, c++11):lessThan(QT_COMPILER_STDCXX, 201103): CONFIG += c++11
CONFIG += c++11
!build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") {
#

View File

@ -2388,22 +2388,6 @@ void Configure::autoDetection()
}
}
if (!dictionary["QMAKESPEC"].contains("msvc")) {
if (tryCompileProject("common/c++default", QString(), false)) {
QFile iiFile(buildPath + "/config.tests/common/c++default/c++default.ii");
if (iiFile.open(QIODevice::ReadOnly)) {
QString content = QString::fromUtf8(iiFile.readAll());
QRegExp expr("\\b([0-9]+)L\\b");
if (expr.indexIn(content) != -1)
dictionary["CFG_STDCXX_DEFAULT"] = expr.cap(1);
}
}
if (dictionary["CFG_STDCXX_DEFAULT"].isEmpty()) {
cout << "Could not determine the C++ standard the compiler uses by default, assuming C++98." << endl;
dictionary["CFG_STDCXX_DEFAULT"] = "199711";
}
}
if (dictionary["ATOMIC64"] == "auto")
dictionary["ATOMIC64"] = checkAvailability("ATOMIC64") ? "yes" :
checkAvailability("ATOMIC64-LIBATOMIC") ? "libatomic" : "no";
@ -2756,8 +2740,6 @@ void Configure::generateOutputVars()
qtConfig += "c++11 c++14";
else if (dictionary[ "C++STD" ] == "c++1z")
qtConfig += "c++11 c++14 c++1z";
if (!dictionary[ "CFG_STDCXX_DEFAULT" ].isEmpty())
qmakeVars += "QT_COMPILER_STDCXX = " + dictionary[ "CFG_STDCXX_DEFAULT" ];
if (dictionary[ "USE_GOLD_LINKER" ] == "yes")
qmakeConfig += "use_gold_linker";