diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-07-09 16:33:33 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-11-04 14:04:35 +0000 |
commit | 932ad390802319af1996f678d9226c2a17a913d0 (patch) | |
tree | d7c65289ebb47e8b4c1444b92905add7280d3a04 /tools/configure/configureapp.cpp | |
parent | b63160b079a124ce45fb5741c65e9a4393aaa560 (diff) |
Remove support for disabling C++11 support in configure
Qt now requires it.
We could try and run the common/c++11 test for MSVC too, but we know it
passes, so we won't bother and thus slow down the configure step.
Change-Id: Ib056b47dde3341ef9a52ffff13ef6b53b9f8bb65
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 08afc51bc4..bdfaeda052 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -468,25 +468,21 @@ void Configure::parseCmdLine() dictionary[ "COMPILE_EXAMPLES" ] = "no"; } - else if (configCmdLine.at(i) == "-c++11") - dictionary[ "C++STD" ] = "c++11"; - else if (configCmdLine.at(i) == "-no-c++11") - dictionary[ "C++STD" ] = "c++98"; else if (configCmdLine.at(i) == "-c++std") { ++i; if (i == argCount) break; QString level = configCmdLine.at(i); - if (level == "c++98" || level == "c++11" || level == "c++14" || level == "c++1z" + if (level == "c++11" || level == "c++14" || level == "c++1z" || level == "auto") { dictionary[ "C++STD" ] = level; - } else if (level == "98" || level == "11" || level == "14" || level == "1z") { + } else if (level == "11" || level == "14" || level == "1z") { dictionary[ "C++STD" ] = "c++" + level; } else { dictionary[ "DONE" ] = "error"; cout << "ERROR: invalid C++ standard " << level - << "; valid options are: c++98 c++11 c++14 c++1z auto" << endl; + << "; valid options are: c++11 c++14 c++1z auto" << endl; return; } } @@ -1824,7 +1820,7 @@ bool Configure::displayHelp() desc("OPENSOURCE", "opensource", "-opensource", "Compile and link the Open-Source Edition of Qt."); desc("COMMERCIAL", "commercial", "-commercial", "Compile and link the Commercial Edition of Qt.\n"); - desc( "-c++std <edition>", "Compile Qt with C++ standard edition (c++98, c++11, c++14, c++1z)\n" + desc( "-c++std <edition>", "Compile Qt with C++ standard edition (c++11, c++14, c++1z)\n" "Default: highest supported. This option is not supported for MSVC.\n"); desc("USE_GOLD_LINKER", "yes", "-use-gold-linker", "Link using the GNU gold linker (gcc only)."); @@ -2401,7 +2397,10 @@ void Configure::autoDetection() if (dictionary["C++STD"] == "auto" && !dictionary["QMAKESPEC"].contains("msvc")) { if (!tryCompileProject("common/c++11")) { - dictionary["C++STD"] = "c++98"; + dictionary["DONE"] = "error"; + cout << "ERROR: Qt requires a C++11 compiler and yours does not seem to be that." << endl + << "Please upgrade." << endl; + return; } else if (!tryCompileProject("common/c++14")) { dictionary["C++STD"] = "c++11"; } else if (!tryCompileProject("common/c++1z")) { @@ -4059,14 +4058,6 @@ void Configure::displayConfig() << "will be the same unless you are cross-compiling)." << endl << endl; } - if (dictionary["C++STD"] == "c++98") { - sout << endl - << "NOTE: The -no-c++11 / -c++-level c++98 option is deprecated." << endl - << endl - << "Qt 5.7 will require C++11 support. The options are in effect for this" << endl - << "Qt 5.6 build, but you should update your build scripts to remove the" << endl - << "option and, if necessary, upgrade your compiler." << endl; - } if (!dictionary["PREFIX_COMPLAINTS"].isEmpty()) { sout << endl << dictionary["PREFIX_COMPLAINTS"] << endl |