summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp147
1 files changed, 47 insertions, 100 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 90981f6624..f8715ef32e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -157,9 +157,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "QCONFIG" ] = "full";
dictionary[ "EMBEDDED" ] = "no";
dictionary[ "BUILD_QMAKE" ] = "yes";
- dictionary[ "VCPROJFILES" ] = "yes";
dictionary[ "QMAKE_INTERNAL" ] = "no";
- dictionary[ "PROCESS" ] = "partial";
dictionary[ "WIDGETS" ] = "yes";
dictionary[ "GUI" ] = "yes";
dictionary[ "RTTI" ] = "yes";
@@ -239,7 +237,6 @@ Configure::Configure(int& argc, char** argv)
}
dictionary[ "REDO" ] = "no";
- dictionary[ "DEPENDENCIES" ] = "no";
dictionary[ "BUILD" ] = "debug";
dictionary[ "BUILDALL" ] = "auto"; // Means yes, but not explicitly
@@ -253,13 +250,15 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "C++11" ] = "auto";
+ dictionary[ "USE_GOLD_LINKER" ] = "no";
+
dictionary[ "SHARED" ] = "yes";
dictionary[ "ZLIB" ] = "auto";
dictionary[ "PCRE" ] = "auto";
- dictionary[ "ICU" ] = "auto";
+ dictionary[ "ICU" ] = "no";
dictionary[ "ANGLE" ] = "auto";
dictionary[ "DYNAMICGL" ] = "auto";
@@ -314,11 +313,6 @@ Configure::Configure(int& argc, char** argv)
Configure::~Configure()
{
- for (int i=0; i<3; ++i) {
- QList<MakeItem*> items = makeList[i];
- for (int j=0; j<items.size(); ++j)
- delete items[j];
- }
}
QString Configure::formatPath(const QString &path)
@@ -431,7 +425,15 @@ void Configure::parseCmdLine()
++i;
if (i == argCount)
break;
- dictionary[ "QREAL" ] = configCmdLine.at(i);
+ QString s = dictionary[ "QREAL" ] = configCmdLine.at(i);
+ if (s == "float") {
+ dictionary[ "QREAL_STRING" ] = "\"float\"";
+ } else {
+ // escape
+ s = s.simplified();
+ s = '"' + s.toLatin1().toPercentEncoding(QByteArray(), "-._~", '_') + '"';
+ dictionary[ "QREAL_STRING" ] = s;
+ }
}
else if (configCmdLine.at(i) == "-release") {
@@ -461,6 +463,10 @@ void Configure::parseCmdLine()
dictionary[ "C++11" ] = "yes";
else if (configCmdLine.at(i) == "-no-c++11")
dictionary[ "C++11" ] = "no";
+ else if (configCmdLine.at(i) == "-use-gold-linker")
+ dictionary[ "USE_GOLD_LINKER" ] = "yes";
+ else if (configCmdLine.at(i) == "-no-use-gold-linker")
+ dictionary[ "USE_GOLD_LINKER" ] = "no";
else if (configCmdLine.at(i) == "-shared")
dictionary[ "SHARED" ] = "yes";
else if (configCmdLine.at(i) == "-static")
@@ -788,12 +794,6 @@ void Configure::parseCmdLine()
imageFormats.contains(configCmdLine.at(i).section('-', 3)))
dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no";
- // IDE project generation -----------------------------------
- else if (configCmdLine.at(i) == "-no-vcproj")
- dictionary[ "VCPROJFILES" ] = "no";
- else if (configCmdLine.at(i) == "-vcproj")
- dictionary[ "VCPROJFILES" ] = "yes";
-
else if (configCmdLine.at(i) == "-no-incredibuild-xge")
dictionary[ "INCREDIBUILD_XGE" ] = "no";
else if (configCmdLine.at(i) == "-incredibuild-xge")
@@ -943,19 +943,6 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-qmake")
dictionary[ "BUILD_QMAKE" ] = "yes";
- else if (configCmdLine.at(i) == "-dont-process")
- dictionary[ "PROCESS" ] = "no";
- else if (configCmdLine.at(i) == "-process")
- dictionary[ "PROCESS" ] = "partial";
- else if (configCmdLine.at(i) == "-fully-process")
- dictionary[ "PROCESS" ] = "full";
-
- else if (configCmdLine.at(i) == "-no-qmake-deps")
- dictionary[ "DEPENDENCIES" ] = "no";
- else if (configCmdLine.at(i) == "-qmake-deps")
- dictionary[ "DEPENDENCIES" ] = "yes";
-
-
else if (configCmdLine.at(i) == "-qtnamespace") {
++i;
if (i == argCount)
@@ -1654,8 +1641,6 @@ void Configure::applySpecSpecifics()
dictionary[ "LARGE_FILE" ] = "no";
dictionary[ "ANGLE" ] = "d3d11";
dictionary[ "DYNAMICGL" ] = "no";
- if (dictionary.value("XQMAKESPEC").startsWith("winphone"))
- dictionary[ "SQL_SQLITE" ] = "no";
} else if (dictionary.value("XQMAKESPEC").startsWith("wince")) {
dictionary[ "STYLE_WINDOWSXP" ] = "no";
dictionary[ "STYLE_WINDOWSVISTA" ] = "no";
@@ -1783,6 +1768,9 @@ bool Configure::displayHelp()
desc("C++11", "yes", "-c++11", "Compile Qt with C++11 support enabled.");
desc("C++11", "no", "-no-c++11", "Do not compile Qt with C++11 support enabled.\n");
+ desc("USE_GOLD_LINKER", "yes", "-use-gold-linker", "Link using the GNU gold linker (gcc only).");
+ desc("USE_GOLD_LINKER", "no", "-no-use-gold-linker", "Do not link using the GNU gold linker.\n");
+
desc("SHARED", "yes", "-shared", "Create and use shared Qt libraries.");
desc("SHARED", "no", "-static", "Create and use static Qt libraries.\n");
@@ -1948,9 +1936,6 @@ bool Configure::displayHelp()
// Qt\Windows only options go below here --------------------------------------------------------------------------------
desc("\nQt for Windows only:\n\n");
- desc("VCPROJFILES", "no", "-no-vcproj", "Do not generate VC++ .vcproj files.");
- desc("VCPROJFILES", "yes", "-vcproj", "Generate VC++ .vcproj files, only if platform \"win32-msvc.net\".\n");
-
desc("INCREDIBUILD_XGE", "no", "-no-incredibuild-xge", "Do not add IncrediBuild XGE distribution commands to custom build steps.");
desc("INCREDIBUILD_XGE", "yes", "-incredibuild-xge", "Add IncrediBuild XGE distribution commands to custom build steps. This will distribute MOC and UIC steps, and other custom buildsteps which are added to the INCREDIBUILD_XGE variable.\n(The IncrediBuild distribution commands are only added to Visual Studio projects)\n");
@@ -1959,10 +1944,6 @@ bool Configure::displayHelp()
desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake.");
desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n");
- desc("PROCESS", "partial", "-process", "Generate only top-level Makefile.");
- desc("PROCESS", "full", "-fully-process", "Generate Makefiles/Project files for the entire Qt\ntree.");
- desc("PROCESS", "no", "-dont-process", "Do not generate Makefiles/Project files.\n");
-
desc( "-qreal [double|float]", "typedef qreal to the specified type. The default is double.\n"
"Note that changing this flag affects binary compatibility.\n");
@@ -2299,7 +2280,7 @@ bool Configure::checkAvailability(const QString &part)
available = (platform() == QNX || platform() == BLACKBERRY)
&& tryCompileProject("unix/lgmon");
} else if (part == "NEON") {
- available = (dictionary["QT_ARCH"] == "arm") && tryCompileProject("unix/neon");
+ available = dictionary["QT_CPU_FEATURES"].contains("neon");
} else if (part == "FONT_CONFIG") {
available = tryCompileProject("unix/fontconfig");
}
@@ -2588,8 +2569,9 @@ bool Configure::verifyConfiguration()
}
if (dictionary["DYNAMICGL"] == "yes") {
- if (dictionary["OPENGL_ES_2"] == "yes" || dictionary["ANGLE"] != "no") {
- cout << "ERROR: Dynamic OpenGL cannot be used together with native Angle (GLES2) builds." << endl;
+ // Note that d3d11 is still allowed for ANGLE, hence the check for == "yes".
+ if (dictionary["OPENGL_ES_2"] == "yes" || dictionary["ANGLE"] == "yes") {
+ cout << "ERROR: Dynamic OpenGL cannot be used with -angle." << endl;
dictionary[ "DONE" ] = "error";
}
}
@@ -2637,6 +2619,9 @@ void Configure::generateOutputVars()
if (dictionary[ "C++11" ] == "yes")
qtConfig += "c++11";
+ if (dictionary[ "USE_GOLD_LINKER" ] == "yes")
+ qmakeConfig += "use_gold_linker";
+
if (dictionary[ "SHARED" ] == "no")
qtConfig += "static";
else
@@ -2672,8 +2657,11 @@ void Configure::generateOutputVars()
}
// Dynamic OpenGL loading ---------------------------------------
- if (dictionary[ "DYNAMICGL" ] != "no")
+ if (dictionary[ "DYNAMICGL" ] != "no") {
qtConfig += "dynamicgl";
+ if (dictionary[ "ANGLE" ] == "d3d11")
+ qmakeConfig += "angle_d3d11";
+ }
// Image formates -----------------------------------------------
if (dictionary[ "GIF" ] == "no")
@@ -3499,24 +3487,26 @@ void Configure::generateConfigfiles()
tmpStream << endl << "// Compiler sub-arch support" << endl;
if (dictionary[ "SSE2" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_SSE2" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_SSE2 1" << endl;
if (dictionary[ "SSE3" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_SSE3" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_SSE3 1" << endl;
if (dictionary[ "SSSE3" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_SSSE3" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_SSSE3 1" << endl;
if (dictionary[ "SSE4_1" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_1" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_1 1" << endl;
if (dictionary[ "SSE4_2" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_2" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_2 1" << endl;
if (dictionary[ "AVX" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_AVX" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_AVX 1" << endl;
if (dictionary[ "AVX2" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_AVX2" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_AVX2 1" << endl;
if (dictionary[ "IWMMXT" ] == "yes")
- tmpStream << "#define QT_COMPILER_SUPPORTS_IWMMXT" << endl;
+ tmpStream << "#define QT_COMPILER_SUPPORTS_IWMMXT 1" << endl;
- if (dictionary["QREAL"] != "double")
+ if (dictionary["QREAL"] != "double") {
tmpStream << "#define QT_COORD_TYPE " << dictionary["QREAL"] << endl;
+ tmpStream << "#define QT_COORD_TYPE_STRING " << dictionary["QREAL_STRING"] << endl;
+ }
tmpStream << endl << "// Compile time features" << endl;
@@ -4175,27 +4165,8 @@ void Configure::buildQmake()
}
-void Configure::appendMakeItem(int inList, const QString &item)
-{
- QString dir;
- if (item != "src")
- dir = "/" + item;
- dir.prepend("/src");
- makeList[inList].append(new MakeItem(sourcePath + dir,
- item + ".pro", buildPath + dir + "/Makefile", Lib));
- if (dictionary[ "VCPROJFILES" ] == "yes") {
- makeList[inList].append(new MakeItem(sourcePath + dir,
- item + ".pro", buildPath + dir + "/" + item + ".vcproj", Lib));
- }
-}
-
void Configure::generateMakefiles()
{
- if (dictionary[ "PROCESS" ] != "no") {
- QString spec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ];
- if (spec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince")) && !spec.startsWith("winphone") && !spec.startsWith("winrt") )
- dictionary[ "VCPROJFILES" ] = "no";
-
QString pwd = QDir::currentPath();
{
QString sourcePathMangled = sourcePath;
@@ -4204,40 +4175,16 @@ void Configure::generateMakefiles()
sourcePathMangled = QFileInfo(sourcePath).path();
buildPathMangled = QFileInfo(buildPath).path();
}
- bool generate = true;
- bool doDsp = (dictionary["VCPROJFILES"] == "yes"
- && dictionary["PROCESS"] == "full");
- while (generate) {
- QStringList args;
- args << buildPath + "/bin/qmake";
-
- if (doDsp) {
- if (dictionary[ "DEPENDENCIES" ] == "no")
- args << "-nodepend";
- args << "-tp" << "vc";
- doDsp = false; // DSP files will be done
- printf("Generating Visual Studio project files...\n");
- } else {
- printf("Generating Makefiles...\n");
- generate = false; // Now Makefiles will be done
- }
- if (dictionary[ "PROCESS" ] == "full")
- args << "-r";
- args << sourcePathMangled;
+ QStringList args;
+ args << buildPath + "/bin/qmake" << sourcePathMangled;
- QDir::setCurrent(buildPathMangled);
- if (int exitCode = Environment::execute(args, QStringList(), QStringList())) {
- cout << "Qmake failed, return code " << exitCode << endl << endl;
- dictionary[ "DONE" ] = "error";
- }
+ QDir::setCurrent(buildPathMangled);
+ if (int exitCode = Environment::execute(args, QStringList(), QStringList())) {
+ cout << "Qmake failed, return code " << exitCode << endl << endl;
+ dictionary[ "DONE" ] = "error";
}
}
QDir::setCurrent(pwd);
- } else {
- cout << "Processing of project files have been disabled." << endl;
- cout << "Only use this option if you really know what you're doing." << endl << endl;
- return;
- }
}
void Configure::showSummary()